From 20c330ca07169964aae81a5e5110a8bfcd45554a Mon Sep 17 00:00:00 2001 From: morenol Date: Fri, 22 Sep 2023 01:45:00 +0000 Subject: [PATCH] Update rust-bindgen version. Use napi v8 (#236) --- Cargo.lock | 739 +++++++++++++++++------------------------ nj-core/src/basic.rs | 29 +- nj-core/src/bigint.rs | 8 +- nj-core/src/buffer.rs | 4 +- nj-core/src/convert.rs | 18 +- nj-sys/Makefile | 4 +- nj-sys/node.h | 2 +- nj-sys/src/binding.rs | 359 ++++++++++++-------- 8 files changed, 559 insertions(+), 604 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8f39a1d1..94559808 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,18 +14,27 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.5" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "async-channel" -version = "1.9.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" dependencies = [ "concurrent-queue", "event-listener", @@ -34,23 +43,23 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.5.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" dependencies = [ - "async-lock", "async-task", "concurrent-queue", - "fastrand 1.9.0", + "fastrand", "futures-lite", + "once_cell", "slab", ] [[package]] name = "async-global-executor" -version = "2.3.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" +checksum = "5262ed948da60dd8956c6c5aca4d4163593dddb7b32d73267c93dab7b2e98940" dependencies = [ "async-channel", "async-executor", @@ -58,54 +67,53 @@ dependencies = [ "async-lock", "blocking", "futures-lite", + "num_cpus", "once_cell", ] [[package]] name = "async-io" -version = "1.13.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07" dependencies = [ - "async-lock", - "autocfg", - "cfg-if", "concurrent-queue", "futures-lite", + "libc", "log", + "once_cell", "parking", "polling", - "rustix 0.37.23", "slab", "socket2", "waker-fn", + "winapi", ] [[package]] name = "async-lock" -version = "2.8.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" dependencies = [ "event-listener", ] [[package]] name = "async-process" -version = "1.7.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +checksum = "cf2c06e30a24e8c78a3987d07f0930edf76ef35e027e7bdb063fccafdad1f60c" dependencies = [ "async-io", - "async-lock", - "autocfg", "blocking", "cfg-if", "event-listener", "futures-lite", - "rustix 0.37.23", + "libc", + "once_cell", "signal-hook", - "windows-sys", + "winapi", ] [[package]] @@ -137,19 +145,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.4.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn", ] [[package]] @@ -165,9 +173,9 @@ dependencies = [ [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" [[package]] name = "autocfg" @@ -181,73 +189,68 @@ 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 = "blocking" -version = "1.3.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc" dependencies = [ "async-channel", - "async-lock", "async-task", "atomic-waker", - "fastrand 1.9.0", + "fastrand", "futures-lite", - "log", + "once_cell", ] [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" + +[[package]] +name = "cache-padded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" [[package]] name = "camino" -version = "1.1.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" dependencies = [ "serde", ] [[package]] name = "cargo_metadata" -version = "0.15.4" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +checksum = "3abb7553d5b9b8421c6de7cb02606ff15e0c6eea7d8eadd75ef013fd636bec36" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror", ] [[package]] name = "cc" -version = "1.0.83" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -261,18 +264,18 @@ version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ - "bitflags 1.3.2", + "bitflags", "textwrap", "unicode-width", ] [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" dependencies = [ - "crossbeam-utils", + "cache-padded", ] [[package]] @@ -287,71 +290,45 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "7d82ee10ce34d7bc12c2122495e7593a9c41347ecdd64185af4ecf72cb1a7f83" dependencies = [ "cfg-if", + "once_cell", ] [[package]] name = "ctor" -version = "0.1.26" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" +checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" dependencies = [ "quote", - "syn 1.0.109", -] - -[[package]] -name = "errno" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", + "syn", ] [[package]] name = "event-listener" -version = "2.5.3" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" [[package]] name = "fastrand" -version = "1.9.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" dependencies = [ "instant", ] -[[package]] -name = "fastrand" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" - [[package]] name = "fluvio-future" version = "0.3.18" @@ -403,9 +380,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" dependencies = [ "futures-channel", "futures-core", @@ -418,9 +395,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", "futures-sink", @@ -428,15 +405,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" dependencies = [ "futures-core", "futures-task", @@ -445,17 +422,17 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" [[package]] name = "futures-lite" -version = "1.13.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" dependencies = [ - "fastrand 1.9.0", + "fastrand", "futures-core", "futures-io", "memchr", @@ -466,32 +443,32 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ "futures-channel", "futures-core", @@ -507,26 +484,26 @@ dependencies = [ [[package]] name = "ghost" -version = "0.1.14" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba330b70a5341d3bc730b8e205aaee97ddab5d9c448c4f51a7c2d924266fa8f9" +checksum = "b93490550b1782c589a350f2211fff2e34682e25fed17ef53fc4fa8fe184975e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn", ] [[package]] name = "glob" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "gloo-timers" -version = "0.2.6" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" dependencies = [ "futures-channel", "futures-core", @@ -545,9 +522,12 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] [[package]] name = "http_req" @@ -590,31 +570,20 @@ checksum = "7e41b53715c6f0c4be49510bb82dee2c1e51c8586d885abe65396e82ed518548" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys", + "syn", ] [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "c3fac17f7123a73ca62df411b1bf727ccc805daa070338fda671c86dac1bdc27" dependencies = [ "wasm-bindgen", ] @@ -636,27 +605,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ "autocfg", "scopeguard", @@ -664,10 +621,11 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ + "cfg-if", "value-bag", ] @@ -677,20 +635,20 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] name = "memchr" -version = "2.6.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" dependencies = [ "lazy_static", "libc", @@ -750,7 +708,7 @@ dependencies = [ "node-bindgen", "proc-macro2", "quote", - "syn 1.0.109", + "syn", "trybuild", ] @@ -768,21 +726,11 @@ dependencies = [ "nj-sys", ] -[[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-bigint" -version = "0.4.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ "autocfg", "num-integer", @@ -801,26 +749,36 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "once_cell" -version = "1.18.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" dependencies = [ - "bitflags 2.4.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -831,13 +789,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn", ] [[package]] @@ -848,27 +806,22 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.92" +version = "0.9.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" +checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" 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" -version = "2.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" [[package]] name = "parking_lot" @@ -883,14 +836,14 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.6" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "smallvec", "winapi", ] @@ -907,29 +860,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.3" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "78203e83c48cffbe01e4a2d35d566ca4de445d79a85372fc64e378bfc812a260" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "710faf75e1b33345361201d36d04e98ac1ed8909151a017ed384700836104c74" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -939,24 +892,21 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "polling" -version = "2.8.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" dependencies = [ - "autocfg", - "bitflags 1.3.2", "cfg-if", - "concurrent-queue", "libc", "log", - "pin-project-lite", - "windows-sys", + "wepoll-ffi", + "winapi", ] [[package]] @@ -968,7 +918,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", + "syn", "version_check", ] @@ -985,50 +935,40 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" dependencies = [ "proc-macro2", ] [[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" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] name = "regex" -version = "1.9.4" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.7", - "regex-syntax 0.7.5", + "regex-syntax", ] [[package]] @@ -1037,31 +977,23 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax 0.6.29", -] - -[[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 0.7.5", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] -name = "regex-syntax" -version = "0.7.5" +name = "remove_dir_all" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] [[package]] name = "rustc_version" @@ -1072,61 +1004,35 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.37.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys", -] - -[[package]] -name = "rustix" -version = "0.38.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964" -dependencies = [ - "bitflags 2.4.0", - "errno", - "libc", - "linux-raw-sys 0.4.5", - "windows-sys", -] - [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ + "lazy_static", "windows-sys", ] [[package]] name = "scopeguard" -version = "1.2.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "2.9.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -1135,9 +1041,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -1145,44 +1051,44 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" dependencies = [ "serde", ] [[package]] name = "send_wrapper" -version = "0.6.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +checksum = "930c0acf610d3fdb5e2ab6213019aaa04e227ebe9547b0649ba599b16d788bd7" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "1578c6245786b9d168c5447eeacfb96856573ca56c9d68fdcf394be134882a47" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "023e9b1467aef8a10fb88f25611870ada9800ef7e22afce356bb0d2387b6f27c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" dependencies = [ "itoa", "ryu", @@ -1200,9 +1106,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.17" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" dependencies = [ "libc", "signal-hook-registry", @@ -1210,33 +1116,30 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" dependencies = [ "libc", ] [[package]] name = "slab" -version = "0.4.9" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" [[package]] name = "smallvec" -version = "1.11.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" dependencies = [ "libc", "winapi", @@ -1263,25 +1166,14 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "syn", ] [[package]] name = "syn" -version = "2.0.29" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ "proc-macro2", "quote", @@ -1290,22 +1182,23 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if", - "fastrand 2.0.0", - "redox_syscall 0.3.5", - "rustix 0.38.10", - "windows-sys", + "fastrand", + "libc", + "redox_syscall", + "remove_dir_all", + "winapi", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] @@ -1321,48 +1214,47 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ - "cfg-if", "once_cell", ] [[package]] name = "toml" -version = "0.5.11" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ] [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if", "pin-project-lite", @@ -1372,20 +1264,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" dependencies = [ "once_cell", "valuable", @@ -1404,12 +1296,12 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "3a713421342a5a666b7577783721d3117f1b69a393df803ee17bb73b1e122a59" dependencies = [ + "ansi_term", "matchers", - "nu-ansi-term", "once_cell", "regex", "sharded-slab", @@ -1435,36 +1327,36 @@ dependencies = [ [[package]] name = "unicase" -version = "2.7.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ "version_check", ] [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "uuid" -version = "1.4.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f" [[package]] name = "valuable" @@ -1474,9 +1366,13 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.4.1" +version = "1.0.0-alpha.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" +checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" +dependencies = [ + "ctor", + "version_check", +] [[package]] name = "vcpkg" @@ -1498,9 +1394,9 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1508,24 +1404,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a" dependencies = [ "bumpalo", + "lazy_static", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "de9a9cec1733468a8c657e57fa2413d2ae2c0129b95e87c5b72b8ace4d13f31f" dependencies = [ "cfg-if", "js-sys", @@ -1535,9 +1431,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1545,33 +1441,42 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "2fed94beee57daf8dd7d51f2b15dc2bcde92d7a72304cdf662a4371008b71b90" dependencies = [ "js-sys", "wasm-bindgen", ] +[[package]] +name = "wepoll-ffi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +dependencies = [ + "cc", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1605,80 +1510,56 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[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" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_msvc", "windows_x86_64_gnu", - "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] -[[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.48.5" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "ws_stream_wasm" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +checksum = "47ca1ab42f5afed7fc332b22b6e932ca5414b209465412c8cdf0ad23bc0de645" dependencies = [ "async_io_stream", "futures", "js-sys", - "log", "pharos", "rustc_version", "send_wrapper", diff --git a/nj-core/src/basic.rs b/nj-core/src/basic.rs index 08e0b9b2..f138443a 100644 --- a/nj-core/src/basic.rs +++ b/nj-core/src/basic.rs @@ -1,7 +1,6 @@ use std::ptr; use std::ffi::CString; use std::collections::VecDeque; -use std::convert::TryFrom; use log::error; use log::debug; @@ -18,7 +17,6 @@ use crate::sys::napi_has_property; use crate::sys::napi_ref; use crate::sys::napi_deferred; use crate::sys::napi_threadsafe_function_call_js; -use crate::sys::size_t; use crate::napi_call_result; use crate::napi_call_assert; @@ -83,7 +81,7 @@ impl JsEnv { napi_call_result!(napi_create_string_utf8( self.0, r_string.as_ptr() as *const ::std::os::raw::c_char, - size_t::try_from(r_string.len()).unwrap(), + r_string.len(), &mut js_value ))?; Ok(js_value) @@ -96,7 +94,7 @@ impl JsEnv { napi_call_result!(napi_create_string_utf8( self.0, r_string.as_ptr() as *const ::std::os::raw::c_char, - size_t::try_from(r_string.len()).unwrap(), + r_string.len(), &mut js_value ))?; Ok(js_value) @@ -153,9 +151,7 @@ impl JsEnv { let mut array = ptr::null_mut(); napi_call_result!(crate::sys::napi_create_array_with_length( - self.0, - size_t::try_from(len).unwrap(), - &mut array + self.0, len, &mut array ))?; Ok(array) } @@ -259,7 +255,7 @@ impl JsEnv { self.0, recv, func, - size_t::try_from(argv.len()).unwrap(), + argv.len(), argv.as_mut_ptr(), &mut result ))?; @@ -278,7 +274,7 @@ impl JsEnv { let mut this = ptr::null_mut(); - let mut argc = size_t::try_from(max_count).unwrap(); + let mut argc = max_count; let mut args = vec![ptr::null_mut(); max_count]; napi_call_result!(napi_get_cb_info( self.0, @@ -290,7 +286,7 @@ impl JsEnv { ))?; // truncate arg to actual received count - args.resize(usize::try_from(argc).unwrap(), ptr::null_mut()); + args.resize(argc, ptr::null_mut()); Ok(JsCallback::new(JsEnv::new(self.0), this, args)) } @@ -313,10 +309,10 @@ impl JsEnv { napi_call_result!(crate::sys::napi_define_class( self.0, name.as_ptr() as *const ::std::os::raw::c_char, - u64::try_from(name.len()).unwrap(), + name.len(), Some(constructor), ptr::null_mut(), - u64::try_from(raw_properties.len()).unwrap(), + raw_properties.len(), raw_properties.as_mut_ptr(), &mut js_constructor ))?; @@ -406,7 +402,7 @@ impl JsEnv { napi_call_result!(crate::sys::napi_new_instance( self.0, constructor, - u64::try_from(args.len()).unwrap(), + args.len(), args.as_mut_ptr(), &mut result ))?; @@ -621,7 +617,7 @@ impl JsEnv { use std::slice; use crate::sys::napi_get_buffer_info; - let mut len = 0u64; + let mut len = 0_usize; let mut data = ptr::null_mut(); // napi_status napi_get_buffer_info(napi_env env, @@ -636,8 +632,7 @@ impl JsEnv { &mut len ))?; - let array: &[u8] = - unsafe { slice::from_raw_parts(data as *const u8, usize::try_from(len).unwrap()) }; + let array: &[u8] = unsafe { slice::from_raw_parts(data as *const u8, len) }; Ok(array) } @@ -914,7 +909,7 @@ impl JsExports { napi_call_result!(crate::sys::napi_define_properties( self.env.inner(), self.inner, - u64::try_from(raw_properties.len()).unwrap(), + raw_properties.len(), raw_properties.as_mut_ptr() )) } diff --git a/nj-core/src/bigint.rs b/nj-core/src/bigint.rs index b4c2653b..1091c733 100644 --- a/nj-core/src/bigint.rs +++ b/nj-core/src/bigint.rs @@ -1,9 +1,7 @@ use std::ptr; -use std::convert::TryFrom; use log::trace; -use crate::sys::size_t; use crate::TryIntoJs; use crate::JSValue; use crate::sys::napi_value; @@ -18,7 +16,7 @@ impl<'a> JSValue<'a> for BigInt { trace!("Converting JS BigInt to Rust!"); env.assert_type(js_value, crate::sys::napi_valuetype_napi_bigint)?; - let mut word_count = 0u64; + let mut word_count = 0_usize; // https://nodejs.org/api/n-api.html#n_api_napi_get_value_bigint_words // Frist call is to figure out how long of a vec to make. @@ -31,7 +29,7 @@ impl<'a> JSValue<'a> for BigInt { ))?; // Now we actually get the sign and the vector. - let mut napi_buffer: Vec = vec![0; usize::try_from(word_count).unwrap()]; + let mut napi_buffer: Vec = vec![0; word_count]; let mut sign = 0; crate::napi_call_result!(crate::sys::napi_get_value_bigint_words( @@ -109,7 +107,7 @@ impl TryIntoJs for BigInt { crate::napi_call_result!(crate::sys::napi_create_bigint_words( env.inner(), sign, - size_t::try_from(word_count).unwrap(), + word_count, words.as_ptr(), &mut napi_buffer ))?; diff --git a/nj-core/src/buffer.rs b/nj-core/src/buffer.rs index bde07f65..da86e4db 100644 --- a/nj-core/src/buffer.rs +++ b/nj-core/src/buffer.rs @@ -1,10 +1,8 @@ use std::ptr; use std::ops::Deref; -use std::convert::TryFrom; use log::trace; -use crate::sys::size_t; use crate::TryIntoJs; use crate::JSValue; use crate::sys::{napi_value, napi_ref, napi_env}; @@ -61,7 +59,7 @@ impl TryIntoJs for ArrayBuffer { crate::napi_call_result!(crate::sys::napi_create_external_arraybuffer( js_env.inner(), data_buffer as *mut core::ffi::c_void, - size_t::try_from(len).unwrap(), + len, Some(Self::finalize_buffer), data_box_ptr, &mut napi_buffer diff --git a/nj-core/src/convert.rs b/nj-core/src/convert.rs index e6ea90b2..e5bd04e1 100644 --- a/nj-core/src/convert.rs +++ b/nj-core/src/convert.rs @@ -1,7 +1,6 @@ -use std::convert::TryFrom; + use std::ptr; -use crate::sys::size_t; use crate::sys::napi_value; use crate::val::JsEnv; use crate::NjError; @@ -320,7 +319,7 @@ impl JSValue<'_> for String { use crate::sys::napi_get_value_string_utf8; - let mut string_size: size_t = 0; + let mut string_size: usize = 0; napi_call_result!(napi_get_value_string_utf8( env.inner(), @@ -332,9 +331,9 @@ impl JSValue<'_> for String { string_size += 1; - let chars_vec: Vec = vec![0; usize::try_from(string_size).unwrap()]; + let chars_vec: Vec = vec![0; string_size]; let mut chars: Box<[u8]> = chars_vec.into_boxed_slice(); - let mut read_size: size_t = 0; + let mut read_size: usize = 0; napi_call_result!(napi_get_value_string_utf8( env.inner(), @@ -344,7 +343,7 @@ impl JSValue<'_> for String { &mut read_size ))?; - let my_chars: Vec = chars[0..usize::try_from(read_size).unwrap()].into(); + let my_chars: Vec = chars[0..read_size].into(); String::from_utf8(my_chars).map_err(|err| err.into()) } @@ -355,7 +354,7 @@ impl<'a> JSValue<'a> for &'a str { fn convert_to_rust(env: &'a JsEnv, js_value: napi_value) -> Result { use crate::sys::napi_get_buffer_info; - let mut len: size_t = 0; + let mut len: usize = 0; let mut data = ptr::null_mut(); napi_call_result!(napi_get_buffer_info( @@ -366,10 +365,7 @@ impl<'a> JSValue<'a> for &'a str { ))?; unsafe { - let i8slice = std::slice::from_raw_parts( - data as *mut ::std::os::raw::c_char, - usize::try_from(len).unwrap(), - ); + let i8slice = std::slice::from_raw_parts(data as *mut ::std::os::raw::c_char, len); let u8slice = &*(i8slice as *const _ as *const [u8]); std::str::from_utf8(u8slice).map_err(|err| err.into()) } diff --git a/nj-sys/Makefile b/nj-sys/Makefile index 7f0901a7..926b6bab 100644 --- a/nj-sys/Makefile +++ b/nj-sys/Makefile @@ -1,6 +1,6 @@ install_bindgen: - cargo install bindgen --version 0.56.0 + cargo install bindgen-cli --version 0.68.1 generate: install_bindgen bindgen --verbose node.h -o src/binding.rs @@ -12,4 +12,4 @@ generate_arm64: install_bindgen clean: - rm -rf src/binding.rs \ No newline at end of file + rm -rf src/binding.rs diff --git a/nj-sys/node.h b/nj-sys/node.h index 4bb9c4e5..897a6f06 100644 --- a/nj-sys/node.h +++ b/nj-sys/node.h @@ -1,3 +1,3 @@ -#define NAPI_VERSION 7 +#define NAPI_VERSION 8 #include "vendor/nodejs_18_17_1/node_api.h" diff --git a/nj-sys/src/binding.rs b/nj-sys/src/binding.rs index c296d63c..388ba1fb 100644 --- a/nj-sys/src/binding.rs +++ b/nj-sys/src/binding.rs @@ -1,9 +1,9 @@ -/* automatically generated by rust-bindgen 0.56.0 */ +/* automatically generated by rust-bindgen 0.68.1 */ -pub const NAPI_VERSION: u32 = 7; -pub const __bool_true_false_are_defined: u32 = 1; +pub const NAPI_VERSION: u32 = 8; pub const true_: u32 = 1; pub const false_: u32 = 0; +pub const __bool_true_false_are_defined: u32 = 1; pub const NAPI_VERSION_EXPERIMENTAL: u32 = 2147483647; pub const __WORDSIZE: u32 = 64; pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 1; @@ -13,7 +13,7 @@ pub const __DARWIN_UNIX03: u32 = 1; pub const __DARWIN_64_BIT_INO_T: u32 = 1; pub const __DARWIN_VERS_1050: u32 = 1; pub const __DARWIN_NON_CANCELABLE: u32 = 0; -pub const __DARWIN_SUF_EXTSN: &'static [u8; 14usize] = b"$DARWIN_EXTSN\0"; +pub const __DARWIN_SUF_EXTSN: &[u8; 14] = b"$DARWIN_EXTSN\0"; pub const __DARWIN_C_ANSI: u32 = 4096; pub const __DARWIN_C_FULL: u32 = 900000; pub const __DARWIN_C_LEVEL: u32 = 900000; @@ -81,7 +81,6 @@ pub const SIG_ATOMIC_MIN: i32 = -2147483648; pub const SIG_ATOMIC_MAX: u32 = 2147483647; pub const NAPI_AUTO_LENGTH: i32 = -1; pub const NAPI_MODULE_VERSION: u32 = 1; -pub type size_t = ::std::os::raw::c_ulong; pub type wchar_t = ::std::os::raw::c_int; pub type max_align_t = f64; pub type int_least8_t = i8; @@ -116,10 +115,11 @@ pub type __darwin_ct_rune_t = ::std::os::raw::c_int; pub union __mbstate_t { pub __mbstate8: [::std::os::raw::c_char; 128usize], pub _mbstateL: ::std::os::raw::c_longlong, - _bindgen_union_align: [u64; 16usize], } #[test] fn bindgen_test_layout___mbstate_t() { + const UNINIT: ::std::mem::MaybeUninit<__mbstate_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__mbstate_t>(), 128usize, @@ -131,7 +131,7 @@ fn bindgen_test_layout___mbstate_t() { concat!("Alignment of ", stringify!(__mbstate_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__mbstate8 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__mbstate8) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -141,7 +141,7 @@ fn bindgen_test_layout___mbstate_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>()))._mbstateL as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr)._mbstateL) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -191,6 +191,9 @@ pub struct __darwin_pthread_handler_rec { } #[test] fn bindgen_test_layout___darwin_pthread_handler_rec() { + const UNINIT: ::std::mem::MaybeUninit<__darwin_pthread_handler_rec> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__darwin_pthread_handler_rec>(), 24usize, @@ -202,9 +205,7 @@ fn bindgen_test_layout___darwin_pthread_handler_rec() { concat!("Alignment of ", stringify!(__darwin_pthread_handler_rec)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__routine as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__routine) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -214,9 +215,7 @@ fn bindgen_test_layout___darwin_pthread_handler_rec() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__arg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__arg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -226,9 +225,7 @@ fn bindgen_test_layout___darwin_pthread_handler_rec() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__next as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -239,13 +236,16 @@ fn bindgen_test_layout___darwin_pthread_handler_rec() { ); } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_attr_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 56usize], } #[test] fn bindgen_test_layout__opaque_pthread_attr_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_attr_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_attr_t>(), 64usize, @@ -257,7 +257,7 @@ fn bindgen_test_layout__opaque_pthread_attr_t() { concat!("Alignment of ", stringify!(_opaque_pthread_attr_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -267,7 +267,7 @@ fn bindgen_test_layout__opaque_pthread_attr_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__opaque as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -278,13 +278,16 @@ fn bindgen_test_layout__opaque_pthread_attr_t() { ); } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_cond_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 40usize], } #[test] fn bindgen_test_layout__opaque_pthread_cond_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_cond_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_cond_t>(), 48usize, @@ -296,7 +299,7 @@ fn bindgen_test_layout__opaque_pthread_cond_t() { concat!("Alignment of ", stringify!(_opaque_pthread_cond_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -306,7 +309,7 @@ fn bindgen_test_layout__opaque_pthread_cond_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__opaque as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -324,6 +327,9 @@ pub struct _opaque_pthread_condattr_t { } #[test] fn bindgen_test_layout__opaque_pthread_condattr_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_condattr_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_condattr_t>(), 16usize, @@ -335,9 +341,7 @@ fn bindgen_test_layout__opaque_pthread_condattr_t() { concat!("Alignment of ", stringify!(_opaque_pthread_condattr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__sig as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -347,9 +351,7 @@ fn bindgen_test_layout__opaque_pthread_condattr_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__opaque as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -360,13 +362,16 @@ fn bindgen_test_layout__opaque_pthread_condattr_t() { ); } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_mutex_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 56usize], } #[test] fn bindgen_test_layout__opaque_pthread_mutex_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_mutex_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_mutex_t>(), 64usize, @@ -378,7 +383,7 @@ fn bindgen_test_layout__opaque_pthread_mutex_t() { concat!("Alignment of ", stringify!(_opaque_pthread_mutex_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -388,9 +393,7 @@ fn bindgen_test_layout__opaque_pthread_mutex_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__opaque as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -408,6 +411,9 @@ pub struct _opaque_pthread_mutexattr_t { } #[test] fn bindgen_test_layout__opaque_pthread_mutexattr_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_mutexattr_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_mutexattr_t>(), 16usize, @@ -419,9 +425,7 @@ fn bindgen_test_layout__opaque_pthread_mutexattr_t() { concat!("Alignment of ", stringify!(_opaque_pthread_mutexattr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__sig as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -431,9 +435,7 @@ fn bindgen_test_layout__opaque_pthread_mutexattr_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__opaque as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -451,6 +453,9 @@ pub struct _opaque_pthread_once_t { } #[test] fn bindgen_test_layout__opaque_pthread_once_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_once_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_once_t>(), 16usize, @@ -462,7 +467,7 @@ fn bindgen_test_layout__opaque_pthread_once_t() { concat!("Alignment of ", stringify!(_opaque_pthread_once_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -472,7 +477,7 @@ fn bindgen_test_layout__opaque_pthread_once_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__opaque as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -483,13 +488,16 @@ fn bindgen_test_layout__opaque_pthread_once_t() { ); } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_rwlock_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 192usize], } #[test] fn bindgen_test_layout__opaque_pthread_rwlock_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_rwlock_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_rwlock_t>(), 200usize, @@ -501,7 +509,7 @@ fn bindgen_test_layout__opaque_pthread_rwlock_t() { concat!("Alignment of ", stringify!(_opaque_pthread_rwlock_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -511,9 +519,7 @@ fn bindgen_test_layout__opaque_pthread_rwlock_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__opaque as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -531,6 +537,9 @@ pub struct _opaque_pthread_rwlockattr_t { } #[test] fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_rwlockattr_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_rwlockattr_t>(), 24usize, @@ -542,9 +551,7 @@ fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { concat!("Alignment of ", stringify!(_opaque_pthread_rwlockattr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__sig as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -554,9 +561,7 @@ fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__opaque as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -567,7 +572,7 @@ fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { ); } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_t { pub __sig: ::std::os::raw::c_long, pub __cleanup_stack: *mut __darwin_pthread_handler_rec, @@ -575,6 +580,8 @@ pub struct _opaque_pthread_t { } #[test] fn bindgen_test_layout__opaque_pthread_t() { + const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_opaque_pthread_t>(), 8192usize, @@ -586,7 +593,7 @@ fn bindgen_test_layout__opaque_pthread_t() { concat!("Alignment of ", stringify!(_opaque_pthread_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__sig as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -596,9 +603,7 @@ fn bindgen_test_layout__opaque_pthread_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_t>())).__cleanup_stack as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_stack) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -608,7 +613,7 @@ fn bindgen_test_layout__opaque_pthread_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__opaque as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -691,6 +696,8 @@ pub const napi_property_attributes_napi_writable: napi_property_attributes = 1; pub const napi_property_attributes_napi_enumerable: napi_property_attributes = 2; pub const napi_property_attributes_napi_configurable: napi_property_attributes = 4; pub const napi_property_attributes_napi_static: napi_property_attributes = 1024; +pub const napi_property_attributes_napi_default_method: napi_property_attributes = 5; +pub const napi_property_attributes_napi_default_jsproperty: napi_property_attributes = 7; pub type napi_property_attributes = ::std::os::raw::c_uint; pub const napi_valuetype_napi_undefined: napi_valuetype = 0; pub const napi_valuetype_napi_null: napi_valuetype = 1; @@ -764,6 +771,9 @@ pub struct napi_property_descriptor { } #[test] fn bindgen_test_layout_napi_property_descriptor() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -775,9 +785,7 @@ fn bindgen_test_layout_napi_property_descriptor() { concat!("Alignment of ", stringify!(napi_property_descriptor)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).utf8name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).utf8name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -787,7 +795,7 @@ fn bindgen_test_layout_napi_property_descriptor() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -797,7 +805,7 @@ fn bindgen_test_layout_napi_property_descriptor() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).method as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -807,7 +815,7 @@ fn bindgen_test_layout_napi_property_descriptor() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).getter as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).getter) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -817,7 +825,7 @@ fn bindgen_test_layout_napi_property_descriptor() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).setter as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).setter) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -827,7 +835,7 @@ fn bindgen_test_layout_napi_property_descriptor() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -837,9 +845,7 @@ fn bindgen_test_layout_napi_property_descriptor() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).attributes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -849,7 +855,7 @@ fn bindgen_test_layout_napi_property_descriptor() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -869,6 +875,9 @@ pub struct napi_extended_error_info { } #[test] fn bindgen_test_layout_napi_extended_error_info() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -880,9 +889,7 @@ fn bindgen_test_layout_napi_extended_error_info() { concat!("Alignment of ", stringify!(napi_extended_error_info)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).error_message as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).error_message) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -892,10 +899,7 @@ fn bindgen_test_layout_napi_extended_error_info() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).engine_reserved as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).engine_reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -905,10 +909,7 @@ fn bindgen_test_layout_napi_extended_error_info() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).engine_error_code as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).engine_error_code) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -918,9 +919,7 @@ fn bindgen_test_layout_napi_extended_error_info() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).error_code as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).error_code) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -943,6 +942,47 @@ pub type napi_key_filter = ::std::os::raw::c_uint; pub const napi_key_conversion_napi_key_keep_numbers: napi_key_conversion = 0; pub const napi_key_conversion_napi_key_numbers_to_strings: napi_key_conversion = 1; pub type napi_key_conversion = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct napi_type_tag { + pub lower: u64, + pub upper: u64, +} +#[test] +fn bindgen_test_layout_napi_type_tag() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(napi_type_tag)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(napi_type_tag)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lower) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(napi_type_tag), + "::", + stringify!(lower) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).upper) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(napi_type_tag), + "::", + stringify!(upper) + ) + ); +} extern "C" { pub fn napi_get_last_error_info( env: napi_env, @@ -970,7 +1010,7 @@ extern "C" { extern "C" { pub fn napi_create_array_with_length( env: napi_env, - length: size_t, + length: usize, result: *mut napi_value, ) -> napi_status; } @@ -990,7 +1030,7 @@ extern "C" { pub fn napi_create_string_latin1( env: napi_env, str_: *const ::std::os::raw::c_char, - length: size_t, + length: usize, result: *mut napi_value, ) -> napi_status; } @@ -998,7 +1038,7 @@ extern "C" { pub fn napi_create_string_utf8( env: napi_env, str_: *const ::std::os::raw::c_char, - length: size_t, + length: usize, result: *mut napi_value, ) -> napi_status; } @@ -1006,7 +1046,7 @@ extern "C" { pub fn napi_create_string_utf16( env: napi_env, str_: *const char16_t, - length: size_t, + length: usize, result: *mut napi_value, ) -> napi_status; } @@ -1021,7 +1061,7 @@ extern "C" { pub fn napi_create_function( env: napi_env, utf8name: *const ::std::os::raw::c_char, - length: size_t, + length: usize, cb: napi_callback, data: *mut ::std::os::raw::c_void, result: *mut napi_value, @@ -1080,8 +1120,8 @@ extern "C" { env: napi_env, value: napi_value, buf: *mut ::std::os::raw::c_char, - bufsize: size_t, - result: *mut size_t, + bufsize: usize, + result: *mut usize, ) -> napi_status; } extern "C" { @@ -1089,8 +1129,8 @@ extern "C" { env: napi_env, value: napi_value, buf: *mut ::std::os::raw::c_char, - bufsize: size_t, - result: *mut size_t, + bufsize: usize, + result: *mut usize, ) -> napi_status; } extern "C" { @@ -1098,8 +1138,8 @@ extern "C" { env: napi_env, value: napi_value, buf: *mut char16_t, - bufsize: size_t, - result: *mut size_t, + bufsize: usize, + result: *mut usize, ) -> napi_status; } extern "C" { @@ -1244,7 +1284,7 @@ extern "C" { pub fn napi_define_properties( env: napi_env, object: napi_value, - property_count: size_t, + property_count: usize, properties: *const napi_property_descriptor, ) -> napi_status; } @@ -1268,7 +1308,7 @@ extern "C" { env: napi_env, recv: napi_value, func: napi_value, - argc: size_t, + argc: usize, argv: *const napi_value, result: *mut napi_value, ) -> napi_status; @@ -1277,7 +1317,7 @@ extern "C" { pub fn napi_new_instance( env: napi_env, constructor: napi_value, - argc: size_t, + argc: usize, argv: *const napi_value, result: *mut napi_value, ) -> napi_status; @@ -1294,7 +1334,7 @@ extern "C" { pub fn napi_get_cb_info( env: napi_env, cbinfo: napi_callback_info, - argc: *mut size_t, + argc: *mut usize, argv: *mut napi_value, this_arg: *mut napi_value, data: *mut *mut ::std::os::raw::c_void, @@ -1311,10 +1351,10 @@ extern "C" { pub fn napi_define_class( env: napi_env, utf8name: *const ::std::os::raw::c_char, - length: size_t, + length: usize, constructor: napi_callback, data: *mut ::std::os::raw::c_void, - property_count: size_t, + property_count: usize, properties: *const napi_property_descriptor, result: *mut napi_value, ) -> napi_status; @@ -1449,7 +1489,7 @@ extern "C" { extern "C" { pub fn napi_create_arraybuffer( env: napi_env, - byte_length: size_t, + byte_length: usize, data: *mut *mut ::std::os::raw::c_void, result: *mut napi_value, ) -> napi_status; @@ -1458,7 +1498,7 @@ extern "C" { pub fn napi_create_external_arraybuffer( env: napi_env, external_data: *mut ::std::os::raw::c_void, - byte_length: size_t, + byte_length: usize, finalize_cb: napi_finalize, finalize_hint: *mut ::std::os::raw::c_void, result: *mut napi_value, @@ -1469,7 +1509,7 @@ extern "C" { env: napi_env, arraybuffer: napi_value, data: *mut *mut ::std::os::raw::c_void, - byte_length: *mut size_t, + byte_length: *mut usize, ) -> napi_status; } extern "C" { @@ -1479,9 +1519,9 @@ extern "C" { pub fn napi_create_typedarray( env: napi_env, type_: napi_typedarray_type, - length: size_t, + length: usize, arraybuffer: napi_value, - byte_offset: size_t, + byte_offset: usize, result: *mut napi_value, ) -> napi_status; } @@ -1490,18 +1530,18 @@ extern "C" { env: napi_env, typedarray: napi_value, type_: *mut napi_typedarray_type, - length: *mut size_t, + length: *mut usize, data: *mut *mut ::std::os::raw::c_void, arraybuffer: *mut napi_value, - byte_offset: *mut size_t, + byte_offset: *mut usize, ) -> napi_status; } extern "C" { pub fn napi_create_dataview( env: napi_env, - length: size_t, + length: usize, arraybuffer: napi_value, - byte_offset: size_t, + byte_offset: usize, result: *mut napi_value, ) -> napi_status; } @@ -1512,10 +1552,10 @@ extern "C" { pub fn napi_get_dataview_info( env: napi_env, dataview: napi_value, - bytelength: *mut size_t, + bytelength: *mut usize, data: *mut *mut ::std::os::raw::c_void, arraybuffer: *mut napi_value, - byte_offset: *mut size_t, + byte_offset: *mut usize, ) -> napi_status; } extern "C" { @@ -1596,7 +1636,7 @@ extern "C" { pub fn napi_create_bigint_words( env: napi_env, sign_bit: ::std::os::raw::c_int, - word_count: size_t, + word_count: usize, words: *const u64, result: *mut napi_value, ) -> napi_status; @@ -1622,7 +1662,7 @@ extern "C" { env: napi_env, value: napi_value, sign_bit: *mut ::std::os::raw::c_int, - word_count: *mut size_t, + word_count: *mut usize, words: *mut u64, ) -> napi_status; } @@ -1660,6 +1700,27 @@ extern "C" { result: *mut bool, ) -> napi_status; } +extern "C" { + pub fn napi_type_tag_object( + env: napi_env, + value: napi_value, + type_tag: *const napi_type_tag, + ) -> napi_status; +} +extern "C" { + pub fn napi_check_object_type_tag( + env: napi_env, + value: napi_value, + type_tag: *const napi_type_tag, + result: *mut bool, + ) -> napi_status; +} +extern "C" { + pub fn napi_object_freeze(env: napi_env, object: napi_value) -> napi_status; +} +extern "C" { + pub fn napi_object_seal(env: napi_env, object: napi_value) -> napi_status; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct napi_callback_scope__ { @@ -1719,6 +1780,8 @@ pub struct napi_node_version { } #[test] fn bindgen_test_layout_napi_node_version() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -1730,7 +1793,7 @@ fn bindgen_test_layout_napi_node_version() { concat!("Alignment of ", stringify!(napi_node_version)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).major as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1740,7 +1803,7 @@ fn bindgen_test_layout_napi_node_version() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1750,7 +1813,7 @@ fn bindgen_test_layout_napi_node_version() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).patch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).patch) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1760,7 +1823,7 @@ fn bindgen_test_layout_napi_node_version() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).release as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).release) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1772,6 +1835,15 @@ fn bindgen_test_layout_napi_node_version() { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct napi_async_cleanup_hook_handle__ { + _unused: [u8; 0], +} +pub type napi_async_cleanup_hook_handle = *mut napi_async_cleanup_hook_handle__; +pub type napi_async_cleanup_hook = ::std::option::Option< + unsafe extern "C" fn(handle: napi_async_cleanup_hook_handle, data: *mut ::std::os::raw::c_void), +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct uv_loop_s { _unused: [u8; 0], } @@ -1791,6 +1863,8 @@ pub struct napi_module { } #[test] fn bindgen_test_layout_napi_module() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 72usize, @@ -1802,7 +1876,7 @@ fn bindgen_test_layout_napi_module() { concat!("Alignment of ", stringify!(napi_module)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nm_version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nm_version) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1812,7 +1886,7 @@ fn bindgen_test_layout_napi_module() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nm_flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nm_flags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1822,7 +1896,7 @@ fn bindgen_test_layout_napi_module() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nm_filename as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nm_filename) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1832,7 +1906,7 @@ fn bindgen_test_layout_napi_module() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nm_register_func as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nm_register_func) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1842,7 +1916,7 @@ fn bindgen_test_layout_napi_module() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nm_modname as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nm_modname) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1852,7 +1926,7 @@ fn bindgen_test_layout_napi_module() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nm_priv as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nm_priv) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1862,7 +1936,7 @@ fn bindgen_test_layout_napi_module() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1878,10 +1952,10 @@ extern "C" { extern "C" { pub fn napi_fatal_error( location: *const ::std::os::raw::c_char, - location_len: size_t, + location_len: usize, message: *const ::std::os::raw::c_char, - message_len: size_t, - ); + message_len: usize, + ) -> !; } extern "C" { pub fn napi_async_init( @@ -1900,7 +1974,7 @@ extern "C" { async_context: napi_async_context, recv: napi_value, func: napi_value, - argc: size_t, + argc: usize, argv: *const napi_value, result: *mut napi_value, ) -> napi_status; @@ -1908,7 +1982,7 @@ extern "C" { extern "C" { pub fn napi_create_buffer( env: napi_env, - length: size_t, + length: usize, data: *mut *mut ::std::os::raw::c_void, result: *mut napi_value, ) -> napi_status; @@ -1916,7 +1990,7 @@ extern "C" { extern "C" { pub fn napi_create_external_buffer( env: napi_env, - length: size_t, + length: usize, data: *mut ::std::os::raw::c_void, finalize_cb: napi_finalize, finalize_hint: *mut ::std::os::raw::c_void, @@ -1926,7 +2000,7 @@ extern "C" { extern "C" { pub fn napi_create_buffer_copy( env: napi_env, - length: size_t, + length: usize, data: *const ::std::os::raw::c_void, result_data: *mut *mut ::std::os::raw::c_void, result: *mut napi_value, @@ -1940,7 +2014,7 @@ extern "C" { env: napi_env, value: napi_value, data: *mut *mut ::std::os::raw::c_void, - length: *mut size_t, + length: *mut usize, ) -> napi_status; } extern "C" { @@ -2006,8 +2080,8 @@ extern "C" { func: napi_value, async_resource: napi_value, async_resource_name: napi_value, - max_queue_size: size_t, - initial_thread_count: size_t, + max_queue_size: usize, + initial_thread_count: usize, thread_finalize_data: *mut ::std::os::raw::c_void, thread_finalize_cb: napi_finalize, context: *mut ::std::os::raw::c_void, @@ -2049,4 +2123,17 @@ extern "C" { func: napi_threadsafe_function, ) -> napi_status; } +extern "C" { + pub fn napi_add_async_cleanup_hook( + env: napi_env, + hook: napi_async_cleanup_hook, + arg: *mut ::std::os::raw::c_void, + remove_handle: *mut napi_async_cleanup_hook_handle, + ) -> napi_status; +} +extern "C" { + pub fn napi_remove_async_cleanup_hook( + remove_handle: napi_async_cleanup_hook_handle, + ) -> napi_status; +} pub type __builtin_va_list = *mut ::std::os::raw::c_char;