From d642e13bfeb66c053b70752a5f6b49b135b0be90 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Tue, 27 Feb 2024 13:03:27 -0800 Subject: [PATCH] release (#530) * release * fix * fix * fix --- .github/workflows/bench.yml | 2 +- Cargo.lock | 92 ++++++++++++++++----------------- Cargo.toml | 1 - Changelog.md | 12 +++++ rust/bench/Cargo.lock | 6 +-- rust/bench/Cargo.toml | 2 + rust/bench/canbench_results.yml | 52 +++++++++---------- rust/candid/Cargo.toml | 6 +-- rust/candid_derive/Cargo.toml | 2 +- rust/candid_parser/Cargo.toml | 2 +- tools/didc/Cargo.toml | 4 +- 11 files changed, 97 insertions(+), 84 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index a70c6225..f60ba266 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -34,11 +34,11 @@ jobs: path: | ~/.cargo target + rust/bench/target key: ${{ runner.os }}-bench-0.1.1-${{ hashFiles('**/Cargo.lock') }} - name: Install canbench run: cargo install canbench - name: Run perf for base branch - if: false run: | pushd main/rust/bench canbench --persist diff --git a/Cargo.lock b/Cargo.lock index fdf06dfa..76055e96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -53,9 +53,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.12" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -234,7 +234,7 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "candid" -version = "0.10.3" +version = "0.10.4" dependencies = [ "anyhow", "bincode", @@ -259,17 +259,17 @@ dependencies = [ [[package]] name = "candid_derive" -version = "0.6.5" +version = "0.6.6" dependencies = [ "lazy_static", "proc-macro2 1.0.78", "quote 1.0.35", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] name = "candid_parser" -version = "0.1.3" +version = "0.1.4" dependencies = [ "anyhow", "arbitrary", @@ -297,9 +297,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9fa1897e4325be0d68d48df6aa1a71ac2ed4d27723887e7754192705350730" +checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" [[package]] name = "cfg-if" @@ -338,7 +338,7 @@ dependencies = [ "heck", "proc-macro2 1.0.78", "quote 1.0.35", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -491,7 +491,7 @@ dependencies = [ [[package]] name = "didc" -version = "0.3.6" +version = "0.3.7" dependencies = [ "anyhow", "candid_parser", @@ -677,9 +677,9 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "hashbrown" @@ -701,9 +701,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" +checksum = "379dada1584ad501b383485dd706b8afb7a70fcbc7f4da7d780638a5a6124a60" [[package]] name = "hex" @@ -910,7 +910,7 @@ dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", "regex-syntax 0.6.29", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -1091,7 +1091,7 @@ dependencies = [ "pest_meta", "proc-macro2 1.0.78", "quote 1.0.35", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -1380,7 +1380,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -1540,9 +1540,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.50" +version = "2.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c" dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", @@ -1551,9 +1551,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", @@ -1610,7 +1610,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -1766,7 +1766,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.3", ] [[package]] @@ -1786,17 +1786,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "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", ] [[package]] @@ -1807,9 +1807,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" [[package]] name = "windows_aarch64_msvc" @@ -1819,9 +1819,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" [[package]] name = "windows_i686_gnu" @@ -1831,9 +1831,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" [[package]] name = "windows_i686_msvc" @@ -1843,9 +1843,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" [[package]] name = "windows_x86_64_gnu" @@ -1855,9 +1855,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" [[package]] name = "windows_x86_64_gnullvm" @@ -1867,9 +1867,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" [[package]] name = "windows_x86_64_msvc" @@ -1879,9 +1879,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" [[package]] name = "yansi" diff --git a/Cargo.toml b/Cargo.toml index 7e38cc2e..574ad071 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,6 @@ members = [ "rust/ic_principal", "tools/didc", ] -exclude = ["rust/bench"] resolver = "2" [workspace.package] diff --git a/Changelog.md b/Changelog.md index 8087c519..72544ca8 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,18 @@ # Changelog +## 2024-02-27 + +### Candid 0.10.4 + +* Support `#[serde(rename = "")]` with arbitrary string. +* Fix a performance bug in the type table parsing. +* Allow setting decoding quota for deserialization with the following new functions: `candid::decode_args_with_config`, `candid::utils::decode_args_with_config_debug`, `candid::decode_one_with_config`, `candid::Decode!([config]; &bytes, T)`, `candid::Decode!(@Debug [config]; &bytes, T)`, `IDLArgs::from_bytes_with_types_with_config` and `IDLArgs::from_bytes_with_config`. The original decoding method remains to be non-metered. + +### candid_parser 0.1.4 + +* Fix Typescript binding for init args. + ## 2024-01-30 ### Candid 0.10.3 diff --git a/rust/bench/Cargo.lock b/rust/bench/Cargo.lock index 3169231a..f4e2c86a 100644 --- a/rust/bench/Cargo.lock +++ b/rust/bench/Cargo.lock @@ -153,7 +153,7 @@ dependencies = [ [[package]] name = "candid" -version = "0.10.3" +version = "0.10.4" dependencies = [ "anyhow", "binread", @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "candid_derive" -version = "0.6.5" +version = "0.6.6" dependencies = [ "lazy_static", "proc-macro2", @@ -184,7 +184,7 @@ dependencies = [ [[package]] name = "candid_parser" -version = "0.1.3" +version = "0.1.4" dependencies = [ "anyhow", "candid", diff --git a/rust/bench/Cargo.toml b/rust/bench/Cargo.toml index cfc1b718..b70c57e5 100644 --- a/rust/bench/Cargo.toml +++ b/rust/bench/Cargo.toml @@ -1,3 +1,5 @@ +[workspace] + [package] name = "bench" edition = "2021" diff --git a/rust/bench/canbench_results.yml b/rust/bench/canbench_results.yml index afc71b66..cbe11ad7 100644 --- a/rust/bench/canbench_results.yml +++ b/rust/bench/canbench_results.yml @@ -1,110 +1,110 @@ benches: blob: total: - instructions: 32549713 + instructions: 32550492 heap_increase: 66 stable_memory_increase: 0 scopes: 1. Encoding: - instructions: 20464391 + instructions: 20464304 heap_increase: 66 stable_memory_increase: 0 2. Decoding: - instructions: 12083336 + instructions: 12084200 heap_increase: 0 stable_memory_increase: 0 btreemap: total: - instructions: 19846587346 + instructions: 20186327897 heap_increase: 1179 stable_memory_increase: 0 scopes: 1. Encoding: - instructions: 4814047546 + instructions: 4814047377 heap_increase: 257 stable_memory_increase: 0 2. Decoding: - instructions: 15032537614 + instructions: 15372278334 heap_increase: 922 stable_memory_increase: 0 extra_args: total: - instructions: 65236 + instructions: 3353125 heap_increase: 0 stable_memory_increase: 0 scopes: {} nns: total: - instructions: 34666300 + instructions: 35715988 heap_increase: 3 stable_memory_increase: 0 scopes: 0. Parsing: - instructions: 18351044 + instructions: 18351038 heap_increase: 3 stable_memory_increase: 0 1. Encoding: - instructions: 2277031 + instructions: 2277022 heap_increase: 0 stable_memory_increase: 0 2. Decoding: - instructions: 13288232 + instructions: 14337935 heap_increase: 0 stable_memory_increase: 0 option_list: total: - instructions: 39063564 + instructions: 41136641 heap_increase: 9 stable_memory_increase: 0 scopes: 1. Encoding: - instructions: 7311271 + instructions: 7311013 heap_increase: 0 stable_memory_increase: 0 2. Decoding: - instructions: 31750543 + instructions: 33823878 heap_increase: 9 stable_memory_increase: 0 text: total: - instructions: 46689130 + instructions: 46689302 heap_increase: 99 stable_memory_increase: 0 scopes: 1. Encoding: - instructions: 28847755 + instructions: 28847669 heap_increase: 99 stable_memory_increase: 0 2. Decoding: - instructions: 17839633 + instructions: 17839891 heap_increase: 0 stable_memory_increase: 0 variant_list: total: - instructions: 31300568 + instructions: 32986769 heap_increase: 2 stable_memory_increase: 0 scopes: 1. Encoding: - instructions: 7519005 + instructions: 7518696 heap_increase: 0 stable_memory_increase: 0 2. Decoding: - instructions: 23779875 + instructions: 25466385 heap_increase: 2 stable_memory_increase: 0 - vec_int64: + vec_int16: total: - instructions: 1065157980 - heap_increase: 1031 + instructions: 1196228620 + heap_increase: 261 stable_memory_increase: 0 scopes: 1. Encoding: - instructions: 341608537 - heap_increase: 1031 + instructions: 168590973 + heap_increase: 261 stable_memory_increase: 0 2. Decoding: - instructions: 723547678 + instructions: 1027635864 heap_increase: 0 stable_memory_increase: 0 version: 0.1.1 diff --git a/rust/candid/Cargo.toml b/rust/candid/Cargo.toml index 3dc074b2..e4856500 100644 --- a/rust/candid/Cargo.toml +++ b/rust/candid/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "candid" -version = "0.10.3" +version = "0.10.4" edition = "2021" rust-version.workspace = true authors = ["DFINITY Team"] @@ -15,9 +15,9 @@ keywords = ["internet-computer", "idl", "candid", "dfinity"] include = ["src", "Cargo.toml", "LICENSE", "README.md"] [dependencies] -candid_derive = { path = "../candid_derive", version = "=0.6.5" } +candid_derive = { path = "../candid_derive", version = "=0.6.6" } ic_principal = { path = "../ic_principal", version = "0.1.0" } -binread = { version = "2.1", features = ["debug_template"] } +binread = { version = "2.2", features = ["debug_template"] } byteorder = "1.5.0" leb128 = "0.2.5" paste = "1.0" diff --git a/rust/candid_derive/Cargo.toml b/rust/candid_derive/Cargo.toml index bc1d8bbe..d71d157d 100644 --- a/rust/candid_derive/Cargo.toml +++ b/rust/candid_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "candid_derive" -version = "0.6.5" +version = "0.6.6" edition = "2021" rust-version.workspace = true authors = ["DFINITY Team"] diff --git a/rust/candid_parser/Cargo.toml b/rust/candid_parser/Cargo.toml index 82e898b2..503322ed 100644 --- a/rust/candid_parser/Cargo.toml +++ b/rust/candid_parser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "candid_parser" -version = "0.1.3" +version = "0.1.4" edition = "2021" rust-version.workspace = true authors = ["DFINITY Team"] diff --git a/tools/didc/Cargo.toml b/tools/didc/Cargo.toml index 0987250e..b1117a5f 100644 --- a/tools/didc/Cargo.toml +++ b/tools/didc/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "didc" -version = "0.3.6" +version = "0.3.7" authors = ["DFINITY Team"] edition = "2021" [dependencies] candid_parser = { path = "../../rust/candid_parser", features = ["all"] } -clap = { version = "4.3", features = ["derive"] } +clap = { version = "4.5", features = ["derive"] } pretty-hex = "0.2.1" hex.workspace = true anyhow.workspace = true