From 0338c25aefc5f2e3b9f067e795f4d5295565df8d Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Fri, 8 Mar 2024 12:42:44 -0800 Subject: [PATCH 1/4] avoid cost overflow and fix principal cost --- rust/candid/src/de.rs | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/rust/candid/src/de.rs b/rust/candid/src/de.rs index 87c3e787..afe5b14a 100644 --- a/rust/candid/src/de.rs +++ b/rust/candid/src/de.rs @@ -40,7 +40,7 @@ impl<'de> IDLDeserialize<'de> { "Cannot parse header".to_string() } })?; - de.add_cost(de.input.position() as usize * 4)?; + de.add_cost((de.input.position() as usize).saturating_mul(4))?; Ok(IDLDeserialize { de }) } /// Deserialize one value from deserializer. @@ -192,9 +192,9 @@ impl DecoderConfig { /// C((k,v) : k:) = 5 + |k| + C(v : ) // variant field /// /// C : -> -> nat - /// C(id(v*) : service ) = 2 + |v*| + |type table| - /// C((id(v*),name) : func ) = 4 + |v*| + |name| + |type table| - /// C(id(v*) : principal) = 1 + |v*| + /// C(id(v*) : service ) = 2 + C(id(v*) : principal) + |type table| + /// C((id(v*),name) : func ) = 2 + C(id(v*) : principal) + C(name : text) + |type table| + /// C(id(v*) : principal) = max(30, |v*|) /// /// When a value `v : t` on the wire is skipped, due to being extra arguments, extra fields and mismatched option types, /// we apply a 50x penalty on `C(v : t)` in the decoding cost. @@ -408,7 +408,11 @@ impl<'de> Deserializer<'de> { } fn add_cost(&mut self, cost: usize) -> Result<()> { if let Some(n) = self.config.decoding_quota { - let cost = if self.is_untyped { cost * 50 } else { cost }; + let cost = if self.is_untyped { + cost.saturating_mul(50) + } else { + cost + }; if n < cost { return Err(Error::msg("Decoding cost exceeds the limit")); } @@ -486,7 +490,7 @@ impl<'de> Deserializer<'de> { ); let mut bytes = vec![2u8]; let id = PrincipalBytes::read(&mut self.input)?; - self.add_cost(id.len as usize + 1)?; + self.add_cost(std::cmp::max(30, id.len as usize))?; bytes.extend_from_slice(&id.inner); visitor.visit_byte_buf(bytes) } @@ -506,7 +510,7 @@ impl<'de> Deserializer<'de> { self.check_subtype()?; let mut bytes = vec![4u8]; let id = PrincipalBytes::read(&mut self.input)?; - self.add_cost(id.len as usize + 1)?; + self.add_cost(std::cmp::max(30, id.len as usize))?; bytes.extend_from_slice(&id.inner); visitor.visit_byte_buf(bytes) } @@ -523,7 +527,11 @@ impl<'de> Deserializer<'de> { let id = PrincipalBytes::read(&mut self.input)?; let len = Len::read(&mut self.input)?.0; let meth = self.borrow_bytes(len)?; - self.add_cost(id.len as usize + len + 3)?; + self.add_cost( + std::cmp::max(30, id.len as usize) + .saturating_add(len) + .saturating_add(2), + )?; // TODO find a better way leb128::write::unsigned(&mut bytes, len as u64)?; bytes.extend_from_slice(meth); @@ -540,7 +548,7 @@ impl<'de> Deserializer<'de> { "blob" ); let len = Len::read(&mut self.input)?.0; - self.add_cost(len + 1)?; + self.add_cost(len.saturating_add(1))?; let blob = self.borrow_bytes(len)?; let mut bytes = Vec::with_capacity(len + 1); bytes.push(6u8); @@ -562,7 +570,7 @@ impl<'de> Deserializer<'de> { V: Visitor<'de>, { let len = Len::read(&mut self.input)?.0 as u64; - self.add_cost(len as usize + 1)?; + self.add_cost((len as usize).saturating_add(1))?; Len::read(&mut self.input)?; let slice_len = self.input.get_ref().len() as u64; let pos = self.input.position(); @@ -773,7 +781,7 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> { "text" ); let len = Len::read(&mut self.input)?.0; - self.add_cost(len + 1)?; + self.add_cost(len.saturating_add(1))?; let bytes = self.borrow_bytes(len)?.to_owned(); let value = String::from_utf8(bytes).map_err(Error::msg)?; visitor.visit_string(value) @@ -788,7 +796,7 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> { "text" ); let len = Len::read(&mut self.input)?.0; - self.add_cost(len + 1)?; + self.add_cost(len.saturating_add(1))?; let slice = self.borrow_bytes(len)?; let value: &str = std::str::from_utf8(slice).map_err(Error::msg)?; visitor.visit_borrowed_str(value) @@ -883,7 +891,7 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> { "vec nat8" ); let len = Len::read(&mut self.input)?.0; - self.add_cost(len + 1)?; + self.add_cost(len.saturating_add(1))?; let bytes = self.borrow_bytes(len)?.to_owned(); visitor.visit_byte_buf(bytes) } @@ -893,7 +901,7 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> { TypeInner::Principal => self.deserialize_principal(visitor), TypeInner::Vec(t) if **t == TypeInner::Nat8 => { let len = Len::read(&mut self.input)?.0; - self.add_cost(len + 1)?; + self.add_cost(len.saturating_add(1))?; let slice = self.borrow_bytes(len)?; visitor.visit_borrowed_bytes(slice) } From e86ac9868cb802911745622f37f20457e3c68f35 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Fri, 8 Mar 2024 13:04:33 -0800 Subject: [PATCH 2/4] update fuzzer --- rust/candid/fuzz/Cargo.lock | 8 +++----- rust/candid/fuzz/fuzz_targets/parser.rs | 4 +++- rust/candid/fuzz/fuzz_targets/type_decoder.rs | 4 +++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/rust/candid/fuzz/Cargo.lock b/rust/candid/fuzz/Cargo.lock index 0ffc0331..6da93d74 100644 --- a/rust/candid/fuzz/Cargo.lock +++ b/rust/candid/fuzz/Cargo.lock @@ -66,7 +66,7 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "candid" -version = "0.9.100" +version = "0.10.4" dependencies = [ "anyhow", "binread", @@ -97,7 +97,7 @@ dependencies = [ [[package]] name = "candid_derive" -version = "0.6.5" +version = "0.6.6" dependencies = [ "lazy_static", "proc-macro2", @@ -188,14 +188,12 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "ic_principal" -version = "0.1.0" +version = "0.1.1" dependencies = [ "arbitrary", "crc32fast", "data-encoding", - "hex", "serde", - "serde_bytes", "sha2", "thiserror", ] diff --git a/rust/candid/fuzz/fuzz_targets/parser.rs b/rust/candid/fuzz/fuzz_targets/parser.rs index c652714f..643e2a89 100644 --- a/rust/candid/fuzz/fuzz_targets/parser.rs +++ b/rust/candid/fuzz/fuzz_targets/parser.rs @@ -3,7 +3,9 @@ use candid::types::value::IDLArgs; use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &[u8]| { - let decoded = match IDLArgs::from_bytes(&data) { + let mut config = candid::DecoderConfig::new(); + config.set_decoding_quota(2_000_000_000); // already scaled by 50x due to untyped + let decoded = match IDLArgs::from_bytes_with_config(&data, &config) { Ok(_v) => _v, Err(_e) => return, }; diff --git a/rust/candid/fuzz/fuzz_targets/type_decoder.rs b/rust/candid/fuzz/fuzz_targets/type_decoder.rs index 201c03e7..137cda6c 100644 --- a/rust/candid/fuzz/fuzz_targets/type_decoder.rs +++ b/rust/candid/fuzz/fuzz_targets/type_decoder.rs @@ -37,7 +37,9 @@ pub struct HttpResponse { fuzz_target!(|data: &[u8]| { let payload = data.to_vec(); - let _decoded = match Decode!(payload.as_slice(), HttpResponse) { + let mut config = candid::DecoderConfig::new(); + config.set_skipping_quota(10_000); + let _decoded = match Decode!([config]; payload.as_slice(), HttpResponse) { Ok(_v) => _v, Err(_e) => return, }; From 62b0e6b2317e1c0addacd369edcb6a4c010ded82 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Fri, 8 Mar 2024 13:05:03 -0800 Subject: [PATCH 3/4] remove bench_result --- rust/bench/canbench_results.yml | 110 -------------------------------- 1 file changed, 110 deletions(-) delete mode 100644 rust/bench/canbench_results.yml diff --git a/rust/bench/canbench_results.yml b/rust/bench/canbench_results.yml deleted file mode 100644 index cbe11ad7..00000000 --- a/rust/bench/canbench_results.yml +++ /dev/null @@ -1,110 +0,0 @@ -benches: - blob: - total: - instructions: 32550492 - heap_increase: 66 - stable_memory_increase: 0 - scopes: - 1. Encoding: - instructions: 20464304 - heap_increase: 66 - stable_memory_increase: 0 - 2. Decoding: - instructions: 12084200 - heap_increase: 0 - stable_memory_increase: 0 - btreemap: - total: - instructions: 20186327897 - heap_increase: 1179 - stable_memory_increase: 0 - scopes: - 1. Encoding: - instructions: 4814047377 - heap_increase: 257 - stable_memory_increase: 0 - 2. Decoding: - instructions: 15372278334 - heap_increase: 922 - stable_memory_increase: 0 - extra_args: - total: - instructions: 3353125 - heap_increase: 0 - stable_memory_increase: 0 - scopes: {} - nns: - total: - instructions: 35715988 - heap_increase: 3 - stable_memory_increase: 0 - scopes: - 0. Parsing: - instructions: 18351038 - heap_increase: 3 - stable_memory_increase: 0 - 1. Encoding: - instructions: 2277022 - heap_increase: 0 - stable_memory_increase: 0 - 2. Decoding: - instructions: 14337935 - heap_increase: 0 - stable_memory_increase: 0 - option_list: - total: - instructions: 41136641 - heap_increase: 9 - stable_memory_increase: 0 - scopes: - 1. Encoding: - instructions: 7311013 - heap_increase: 0 - stable_memory_increase: 0 - 2. Decoding: - instructions: 33823878 - heap_increase: 9 - stable_memory_increase: 0 - text: - total: - instructions: 46689302 - heap_increase: 99 - stable_memory_increase: 0 - scopes: - 1. Encoding: - instructions: 28847669 - heap_increase: 99 - stable_memory_increase: 0 - 2. Decoding: - instructions: 17839891 - heap_increase: 0 - stable_memory_increase: 0 - variant_list: - total: - instructions: 32986769 - heap_increase: 2 - stable_memory_increase: 0 - scopes: - 1. Encoding: - instructions: 7518696 - heap_increase: 0 - stable_memory_increase: 0 - 2. Decoding: - instructions: 25466385 - heap_increase: 2 - stable_memory_increase: 0 - vec_int16: - total: - instructions: 1196228620 - heap_increase: 261 - stable_memory_increase: 0 - scopes: - 1. Encoding: - instructions: 168590973 - heap_increase: 261 - stable_memory_increase: 0 - 2. Decoding: - instructions: 1027635864 - heap_increase: 0 - stable_memory_increase: 0 -version: 0.1.1 From 0b6e514b2da029383431797fa4e8d1ec9f9c9b49 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Fri, 8 Mar 2024 13:14:33 -0800 Subject: [PATCH 4/4] bump version --- Cargo.lock | 190 ++++++++++++++++++++--------------------- rust/candid/Cargo.toml | 2 +- 2 files changed, 95 insertions(+), 97 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 76055e96..ffa9b36e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -234,7 +234,7 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "candid" -version = "0.10.4" +version = "0.10.5" dependencies = [ "anyhow", "bincode", @@ -264,7 +264,7 @@ dependencies = [ "lazy_static", "proc-macro2 1.0.78", "quote 1.0.35", - "syn 2.0.51", + "syn 2.0.52", ] [[package]] @@ -297,9 +297,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.88" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-if" @@ -309,9 +309,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" dependencies = [ "clap_builder", "clap_derive", @@ -319,9 +319,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -338,7 +338,7 @@ dependencies = [ "heck", "proc-macro2 1.0.78", "quote 1.0.35", - "syn 2.0.51", + "syn 2.0.52", ] [[package]] @@ -501,12 +501,6 @@ dependencies = [ "rand", ] -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - [[package]] name = "digest" version = "0.9.0" @@ -699,12 +693,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379dada1584ad501b383485dd706b8afb7a70fcbc7f4da7d780638a5a6124a60" - [[package]] name = "hex" version = "0.4.3" @@ -764,39 +752,37 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", "hashbrown 0.14.3", ] [[package]] -name = "is-terminal" -version = "0.4.12" +name = "itertools" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" dependencies = [ - "hermit-abi", - "libc", - "windows-sys", + "either", ] [[package]] name = "itertools" -version = "0.9.0" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itertools" -version = "0.10.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ "either", ] @@ -809,34 +795,33 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "lalrpop" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" dependencies = [ "ascii-canvas", "bit-set", - "diff", "ena", - "is-terminal", - "itertools 0.10.5", + "itertools 0.11.0", "lalrpop-util", "petgraph", "pico-args", "regex", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", "string_cache", "term", "tiny-keccak", "unicode-xid 0.2.4", + "walkdir", ] [[package]] name = "lalrpop-util" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex", + "regex-automata 0.4.6", ] [[package]] @@ -886,9 +871,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "logos" @@ -910,7 +895,7 @@ dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", "regex-syntax 0.6.29", - "syn 2.0.51", + "syn 2.0.52", ] [[package]] @@ -999,9 +984,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "parking_lot" @@ -1040,9 +1025,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.7" +version = "2.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" dependencies = [ "memchr", "thiserror", @@ -1073,9 +1058,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.7" +version = "2.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" +checksum = "b0d24f72393fd16ab6ac5738bc33cdb6a9aa73f8b902e8fe29cf4e67d7dd1026" dependencies = [ "pest", "pest_generator", @@ -1083,22 +1068,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.7" +version = "2.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" +checksum = "fdc17e2a6c7d0a492f0158d7a4bd66cc17280308bbaff78d5bef566dca35ab80" dependencies = [ "pest", "pest_meta", "proc-macro2 1.0.78", "quote 1.0.35", - "syn 2.0.51", + "syn 2.0.52", ] [[package]] name = "pest_meta" -version = "2.7.7" +version = "2.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" +checksum = "934cd7631c050f4674352a6e835d5f6711ffbfb9345c2fc0107155ac495ae293" dependencies = [ "once_cell", "pest", @@ -1112,7 +1097,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.3", + "indexmap 2.2.5", ] [[package]] @@ -1274,7 +1259,7 @@ checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.5", + "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -1286,9 +1271,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -1301,12 +1286,6 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - [[package]] name = "regex-syntax" version = "0.8.2" @@ -1338,6 +1317,15 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -1380,7 +1368,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", - "syn 2.0.51", + "syn 2.0.52", ] [[package]] @@ -1540,9 +1528,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.51" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", @@ -1610,7 +1598,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", - "syn 2.0.51", + "syn 2.0.52", ] [[package]] @@ -1723,6 +1711,16 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1766,7 +1764,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.3", + "windows-targets 0.52.4", ] [[package]] @@ -1786,17 +1784,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.3", - "windows_aarch64_msvc 0.52.3", - "windows_i686_gnu 0.52.3", - "windows_i686_msvc 0.52.3", - "windows_x86_64_gnu 0.52.3", - "windows_x86_64_gnullvm 0.52.3", - "windows_x86_64_msvc 0.52.3", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -1807,9 +1805,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -1819,9 +1817,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -1831,9 +1829,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -1843,9 +1841,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -1855,9 +1853,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -1867,9 +1865,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -1879,12 +1877,12 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "yansi" -version = "1.0.0-rc.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377" +checksum = "6c2861d76f58ec8fc95708b9b1e417f7b12fd72ad33c01fa6886707092dea0d3" diff --git a/rust/candid/Cargo.toml b/rust/candid/Cargo.toml index e4856500..c570ad55 100644 --- a/rust/candid/Cargo.toml +++ b/rust/candid/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "candid" -version = "0.10.4" +version = "0.10.5" edition = "2021" rust-version.workspace = true authors = ["DFINITY Team"]