Thanks to visit codestin.com
Credit goes to github.com

Skip to content

merge next into master #741

Draft
raymondk wants to merge 18 commits into
masterfrom
merge/master-into-next
Draft

merge next into master #741
raymondk wants to merge 18 commits into
masterfrom
merge/master-into-next

Conversation

@raymondk

Copy link
Copy Markdown
Contributor

No description provided.

ilbertt and others added 17 commits July 29, 2025 20:15
---------

Co-authored-by: Linwei Shang <[email protected]>
Co-authored-by: David Frank <[email protected]>
Looks like a recent bump of the Rust version on CI introduced new Clippy
lints that make CI fail on #668

This PR fixes those lint errors on the `next` branch.
Gets rid of the dodgy `is_empty` function that performed full traversals
of documents to tell if they were empty.
…deprecations (#665)

**Overview**

The JavaScript target would be more useful (especially to Azle
developers) if it exported the IDL type objects that it generates. We
also no longer need the factory functions as of `3.0.0`, thus we will
mark them deprecated and provide direct exports for that previous
functionality.

**Requirements**

The JavaScript target should export all of the IDL type objects,
including the generated `IDL.Service` and `init args`, without the need
to use a factory function.

**Considerations**

There are no breaking changes besides some formatting of the generated
JavaScript files. The `idflFactory` and `init` functions have been
marked as deprecated but not removed. Developers can choose to import
the `IDL` type objects now, but they are not forced to. This is mainly
an ergonomic change with deprecations to prepare for a future with the
best developer experience by default.
**Overview**
Named arguments can also be in the return type according to the spec.
This PR updates the grammar to collect the names of the return types.

As a consequence, it fixes a regression introduced in
https://github.com/dfinity/candid/pull/612/files#diff-c5ff9610c5d6538ec79f3d465965d2b3a3e3b628b16854a91b4b4a90ba766a57L220-L230,
in order to keep parsing the return types with arguments without errors.

Updates a test case to check if the behavior has been restored.
Brings master's ~45 commits (releases up to candid 0.10.29 / candid_parser
0.3.2 / didc 0.6.1 / ic_principal 0.1.3, decode/encode perf work, the
icp-cli/Vite UI rewrite, doc-comment preservation #707, collect-all subtype
errors #725) onto the next branch while preserving next's breaking v-next
features: ArgType return/arg name collection (#684), TypeKey named-type keys
(#590, re-applied on next), the pretty-printing combinator (#668), and the
JS/TS idlService/idlInitArgs exports (#665).

Conflict resolution:
- 16 .d.ts/.js/.mo/.rs goldenfiles regenerated from merged bindings
  (UPDATE_GOLDENFILES=1) β€” output now carries BOTH master's @icp-sdk/core
  imports AND next's idlService/idlInitArgs exports.
- Cargo.lock / bench Cargo.lock regenerated; crate versions take master's.
- 7 source files hand-merged: master's subtype-error rewrite (#725) re-threaded
  over next's ArgType signatures; doc-comment emission folded into next's
  pretty-printing combinator; doc-comment fields kept alongside TypeKey/ArgType
  types and the @icp-sdk TypeScript imports.
- candid_parser/typing.rs (auto-merged but semantically broken): master's new
  validate_type recursion guard adapted to TypeKey-keyed env and ArgType args.

Verified: cargo check/test pass under default, --no-default-features, and
--features all; clippy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Name Max Mem (Kb) Encode Decode
blob 4_224 4_207_540 ($\textcolor{red}{0.00\%}$) 2_118_978 ($\textcolor{green}{-0.11\%}$)
btreemap 75_456 529_877_496 ($\textcolor{green}{-0.00\%}$) 10_166_251_585 ($\textcolor{green}{-0.00\%}$)
double_option 128 1_314_207 ($\textcolor{green}{-0.55\%}$) 18_289_832 ($\textcolor{green}{-32.75\%}$)
large_variant 320 1_032_169 ($\textcolor{green}{-0.49\%}$) 19_052_293 ($\textcolor{green}{-6.27\%}$)
multi_arg 64 550_384 ($\textcolor{green}{-0.21\%}$) 6_202_873 ($\textcolor{green}{-1.27\%}$)
nns 192 1_618_545 ($\textcolor{green}{-18.77\%}$) 3_226_090 ($\textcolor{green}{-41.44\%}$)
nns_list_neurons 1_152 6_562_306 ($\textcolor{green}{-0.47\%}$) 145_983_869 ($\textcolor{green}{-30.72\%}$)
nns_list_proposal 1_216 6_578_795 ($\textcolor{green}{-4.87\%}$) 34_255_898 ($\textcolor{green}{-37.79\%}$)
option_list 128 726_498 ($\textcolor{green}{-0.18\%}$) 15_264_128 ($\textcolor{green}{-7.06\%}$)
result_variant 192 1_375_762 ($\textcolor{green}{-0.22\%}$) 15_109_368 ($\textcolor{green}{-6.39\%}$)
subtype_decode 512 2_660_866 ($\textcolor{green}{-0.12\%}$) 45_646_650 ($\textcolor{green}{-7.53\%}$)
text 6_336 4_204_172 ($\textcolor{green}{-0.00\%}$) 7_877_160 ($\textcolor{green}{-0.00\%}$)
variant_list 128 722_013 ($\textcolor{green}{-0.04\%}$) 14_625_246 ($\textcolor{green}{-6.40\%}$)
vec_int16 12_480 8_404_581 ($\textcolor{red}{0.00\%}$) 249_583_138 ($\textcolor{green}{-0.00\%}$)
vec_nat 11_008 66_046_656 ($\textcolor{green}{-0.00\%}$) 276_026_428 ($\textcolor{green}{-0.00\%}$)
vec_nat32 24_768 16_793_189 ($\textcolor{red}{0.00\%}$) 243_291_963 ($\textcolor{green}{-0.00\%}$)
vec_nat64 49_344 33_570_389 ($\textcolor{red}{0.00\%}$) 251_680_845 ($\textcolor{green}{-0.00\%}$)
vec_service 64 682_071 ($\textcolor{green}{-0.97\%}$) 90_490_883 ($\textcolor{green}{-4.58\%}$)
wide_record 1_152 3_255_978 ($\textcolor{green}{-0.34\%}$) 41_497_077 ($\textcolor{green}{-6.87\%}$)
  • Parser cost: 15_277_663 ($\textcolor{green}{-1.99\%}$)
  • Extra args: 2_060_654 ($\textcolor{green}{-28.00\%}$)
Click to see raw report
---------------------------------------------------

Benchmark: blob
  total:
    instructions: 6.33 M (-0.04%) (change within noise threshold)
    heap_increase: 66 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 4.21 M (0.00%) (change within noise threshold)
    heap_increase: 66 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 2.12 M (-0.11%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap
  total:
    instructions: 10.70 B (-0.00%) (change within noise threshold)
    heap_increase: 1179 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 529.88 M (-0.00%) (change within noise threshold)
    heap_increase: 159 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 10.17 B (-0.00%) (change within noise threshold)
    heap_increase: 1020 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: double_option
  total:
    instructions: 19.61 M (improved by 31.26%)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 1.31 M (-0.55%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 18.29 M (improved by 32.75%)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: extra_args
  total:
    instructions: 2.06 M (improved by 28.00%)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: large_variant
  total:
    instructions: 20.09 M (improved by 5.99%)
    heap_increase: 5 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 1.03 M (-0.49%) (change within noise threshold)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 19.05 M (improved by 6.27%)
    heap_increase: 3 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: multi_arg
  total:
    instructions: 6.76 M (-1.18%) (change within noise threshold)
    heap_increase: 1 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 550.38 K (-0.21%) (change within noise threshold)
    heap_increase: 1 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 6.20 M (-1.27%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: nns
  total:
    instructions: 20.95 M (improved by 12.42%)
    heap_increase: 3 pages (no change)
    stable_memory_increase: 0 pages (no change)

  0. Parsing (scope):
    calls: 1 (no change)
    instructions: 15.28 M (-1.99%) (change within noise threshold)
    heap_increase: 3 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 1.62 M (improved by 18.77%)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 3.23 M (improved by 41.44%)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: nns_list_neurons
  total:
    instructions: 152.55 M (improved by 29.80%)
    heap_increase: 18 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 6.56 M (-0.47%) (change within noise threshold)
    heap_increase: 18 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 145.98 M (improved by 30.72%)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: nns_list_proposal
  total:
    instructions: 40.84 M (improved by 34.11%)
    heap_increase: 19 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 6.58 M (improved by 4.87%)
    heap_increase: 5 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 34.26 M (improved by 37.79%)
    heap_increase: 14 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: option_list
  total:
    instructions: 15.99 M (improved by 6.77%)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 726.50 K (-0.18%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 15.26 M (improved by 7.06%)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: result_variant
  total:
    instructions: 16.49 M (improved by 5.90%)
    heap_increase: 3 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 1.38 M (-0.22%) (change within noise threshold)
    heap_increase: 1 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 15.11 M (improved by 6.39%)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: subtype_decode
  total:
    instructions: 48.31 M (improved by 7.15%)
    heap_increase: 8 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 2.66 M (-0.12%) (change within noise threshold)
    heap_increase: 8 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 45.65 M (improved by 7.53%)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: text
  total:
    instructions: 12.08 M (-0.00%) (change within noise threshold)
    heap_increase: 99 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 4.20 M (-0.00%) (change within noise threshold)
    heap_increase: 66 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 7.88 M (-0.00%) (change within noise threshold)
    heap_increase: 33 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: variant_list
  total:
    instructions: 15.35 M (improved by 6.12%)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 722.01 K (-0.04%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 14.63 M (improved by 6.40%)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_int16
  total:
    instructions: 257.99 M (-0.00%) (change within noise threshold)
    heap_increase: 195 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 8.40 M (0.00%) (change within noise threshold)
    heap_increase: 130 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 249.58 M (-0.00%) (change within noise threshold)
    heap_increase: 65 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_nat
  total:
    instructions: 342.08 M (-0.00%) (change within noise threshold)
    heap_increase: 172 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 66.05 M (-0.00%) (change within noise threshold)
    heap_increase: 33 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 276.03 M (-0.00%) (change within noise threshold)
    heap_increase: 139 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_nat32
  total:
    instructions: 260.09 M (-0.00%) (change within noise threshold)
    heap_increase: 387 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 16.79 M (0.00%) (change within noise threshold)
    heap_increase: 258 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 243.29 M (-0.00%) (change within noise threshold)
    heap_increase: 129 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_nat64
  total:
    instructions: 285.25 M (-0.00%) (change within noise threshold)
    heap_increase: 771 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 33.57 M (0.00%) (change within noise threshold)
    heap_increase: 514 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 251.68 M (-0.00%) (change within noise threshold)
    heap_increase: 257 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_service
  total:
    instructions: 91.18 M (improved by 4.55%)
    heap_increase: 1 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 682.07 K (-0.97%) (change within noise threshold)
    heap_increase: 1 pages (regressed from 0)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 90.49 M (improved by 4.58%)
    heap_increase: 0 pages (improved by 100.00%)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: wide_record
  total:
    instructions: 44.76 M (improved by 6.42%)
    heap_increase: 18 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 3.26 M (-0.34%) (change within noise threshold)
    heap_increase: 18 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 41.50 M (improved by 6.87%)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Summary:
  instructions:
    status:   Improvements detected 🟒
    counts:   [total 20 | regressed 0 | improved 12 | new 0 | unchanged 8]
    change:   [max -231 | p75 -2.60K | median -1.02M | p25 -3.23M | min -64.76M]
    change %: [max -0.00% | p75 -0.00% | median -5.95% | p25 -8.47% | min -34.11%]

  heap_increase:
    status:   No significant changes πŸ‘
    counts:   [total 20 | regressed 0 | improved 0 | new 0 | unchanged 20]
    change:   [max 0 | p75 0 | median 0 | p25 0 | min 0]
    change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]

  stable_memory_increase:
    status:   No significant changes πŸ‘
    counts:   [total 20 | regressed 0 | improved 0 | new 0 | unchanged 20]
    change:   [max 0 | p75 0 | median 0 | p25 0 | min 0]
    change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]

---------------------------------------------------

Only significant changes:
| status | name                           | calls |     ins |  ins Ξ”% | HI |    HI Ξ”% | SMI |  SMI Ξ”% |
|--------|--------------------------------|-------|---------|---------|----|----------|-----|---------|
|   +    | vec_service::1. Encoding       |     1 | 682.07K |  -0.97% |  1 |    +inf% |   0 |   0.00% |
|   -    | vec_service                    |       |  91.18M |  -4.55% |  1 |    0.00% |   0 |   0.00% |
|   -    | vec_service::2. Decoding       |     1 |  90.49M |  -4.58% |  0 | -100.00% |   0 |   0.00% |
|   -    | nns_list_proposal::1. Encoding |     1 |   6.58M |  -4.87% |  5 |    0.00% |   0 |   0.00% |
|   -    | result_variant                 |       |  16.49M |  -5.90% |  3 |    0.00% |   0 |   0.00% |
|   -    | large_variant                  |       |  20.09M |  -5.99% |  5 |    0.00% |   0 |   0.00% |
|   -    | variant_list                   |       |  15.35M |  -6.12% |  2 |    0.00% |   0 |   0.00% |
|   -    | large_variant::2. Decoding     |     1 |  19.05M |  -6.27% |  3 |    0.00% |   0 |   0.00% |
|   -    | result_variant::2. Decoding    |     1 |  15.11M |  -6.39% |  2 |    0.00% |   0 |   0.00% |
|   -    | variant_list::2. Decoding      |     1 |  14.63M |  -6.40% |  2 |    0.00% |   0 |   0.00% |
|   -    | wide_record                    |       |  44.76M |  -6.42% | 18 |    0.00% |   0 |   0.00% |
|   -    | option_list                    |       |  15.99M |  -6.77% |  2 |    0.00% |   0 |   0.00% |
|   -    | wide_record::2. Decoding       |     1 |  41.50M |  -6.87% |  0 |    0.00% |   0 |   0.00% |
|   -    | option_list::2. Decoding       |     1 |  15.26M |  -7.06% |  2 |    0.00% |   0 |   0.00% |
|   -    | subtype_decode                 |       |  48.31M |  -7.15% |  8 |    0.00% |   0 |   0.00% |
|   -    | subtype_decode::2. Decoding    |     1 |  45.65M |  -7.53% |  0 |    0.00% |   0 |   0.00% |
|   -    | nns                            |       |  20.95M | -12.42% |  3 |    0.00% |   0 |   0.00% |
|   -    | nns::1. Encoding               |     1 |   1.62M | -18.77% |  0 |    0.00% |   0 |   0.00% |
|   -    | extra_args                     |       |   2.06M | -28.00% |  0 |    0.00% |   0 |   0.00% |
|   -    | nns_list_neurons               |       | 152.55M | -29.80% | 18 |    0.00% |   0 |   0.00% |
|   -    | nns_list_neurons::2. Decoding  |     1 | 145.98M | -30.72% |  0 |    0.00% |   0 |   0.00% |
|   -    | double_option                  |       |  19.61M | -31.26% |  2 |    0.00% |   0 |   0.00% |
|   -    | double_option::2. Decoding     |     1 |  18.29M | -32.75% |  2 |    0.00% |   0 |   0.00% |
|   -    | nns_list_proposal              |       |  40.84M | -34.11% | 19 |    0.00% |   0 |   0.00% |
|   -    | nns_list_proposal::2. Decoding |     1 |  34.26M | -37.79% | 14 |    0.00% |   0 |   0.00% |
|   -    | nns::2. Decoding               |     1 |   3.23M | -41.44% |  0 |    0.00% |   0 |   0.00% |

ins = instructions, HI = heap_increase, SMI = stable_memory_increase, Ξ”% = percent change

---------------------------------------------------
Successfully persisted results to canbench_results.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants