Skip to content

docs: propose a staged, additive rewrite of candid - #756

Draft
lwshang wants to merge 9 commits into
masterfrom
lwshang/rewrite-charter
Draft

docs: propose a staged, additive rewrite of candid#756
lwshang wants to merge 9 commits into
masterfrom
lwshang/rewrite-charter

Conversation

@lwshang

@lwshang lwshang commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Adds a document proposing a staged, additive rewrite of Candid's specification, reference model, and Rust implementation, plus three directories reserved for it.

Purely additive: five new files, no existing file modified. No code, no dependency changes. candid 0.10.x is unaffected. What this asks for is agreement on a plan, not a review of an implementation.

The artifact to read is REWRITE.md. This description deliberately does not restate it.

What's here

REWRITE.md the proposal — diagnosis, plan, working model, deletion criteria
lean/README.md Lean 4 reference implementation + Verso spec. Would replace coq/ and spec/
crates/README.md redesigned Rust crates. Would replace rust/
crates/CLAUDE.md anti-patterns not to reproduce, each citing the defect it comes from
conformance/README.md machine-readable vectors. Would replace test/

Why

  • Prose spec, Coq model and Rust implementation agree only by manual discipline; nothing fails when they drift. §1.1
  • The Coq model covers nine type constructors — no records, variants, vectors or binary format — and is not executable, so it cannot be a test oracle. §1.2
  • serde cannot express Candid's opt coercion, so de.rs string-matches serde's private module paths and ptr::reads the visitor. Both bugs in 0.10.34 come from this. §1.3
  • CandidType::ty() memoises into four thread-locals, so generated .did type names depend on the order types were first derived. §1.4
  • 246 public items with 8 #[doc(hidden)], and ten decode functions that are a cartesian product of two options. Each fix is a semver break on its own. §1.5
  • The conformance suite needs a working Candid parser before you can run its first test. Our README lists ten community implementations; we have no idea how many conform. §1.6

Scope, stated plainly

Nothing here is scheduled work, and merging it commits no one to anything. The directories would stay empty until there is agreement on the plan; each carries a Status: reserved, empty README in the meantime. §3 is explicit about what Lean would cost, including the bus factor, and §4 about the parts that are slow regardless of how fast the code goes.

The proposed working model is in §5: everything additive, so nothing on master can break and there are structurally zero merge conflicts, with a working branch merged to master at least fortnightly. The existing next branch — 1 commit ahead, 109 behind — is what happens without that last part.

Reviewing this

Verify it does what it says, then argue with the reasoning while it is still cheap to change. The decisions where a different answer would change the most: the serde divorce (§1.3), Lean over "just write more tests" (§3), and one-repo-additive over a separate repository (§4).

Reserves three directories for a staged, additive rewrite of Candid's
specification, reference model, and Rust implementation, and writes down
the reasoning so it is citable rather than living in one person's head.

  lean/         Lean 4 reference implementation + Verso spec sources.
                Eventually replaces coq/ and spec/.
  crates/       Redesigned Rust crates. Eventually replaces rust/.
  conformance/  Machine-readable vectors + generator. Replaces test/.

No code. Every directory contains only a README describing its scope and
the conditions under which the artifact it replaces gets deleted.

The released candid 0.10.x crates are unaffected: nothing here is
published, nothing on master references these directories, and no
existing source file is modified.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lwshang
lwshang requested a review from a team as a code owner July 27, 2026 20:17
@zeropath-ai

zeropath-ai Bot commented Jul 27, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 031317f.

Security Overview
Detected Code Changes
Change Type Relevant files
New infrastructure / project restructuring ► REWRITE.md
(new file)
Documentation and policy additions ► .github/CONTRIBUTING.md
► README.md
► conformance/README.md
► crates/CLAUDE.md
► crates/README.md
► lean/README.md
► crat es/README.md
(updated content as new files added)
New top-level directories added (architecture rewrite) ► lean/README.md
► lean/README.md
► conformance/README.md
► crates/CLAUDE.md
► crates/README.md
► lean/README.md
► cr ates/README.md
(new files indicating new structure)
Addition of new content files for ratchet and migration plan ► REWRITE.md
► conformance/README.md
► crates/CLAUDE.md
► crates/README.md
► lean/README.md
► crates/CLAUDE.md
► conformance/README.md
(new files)
No functional code changes detected (No .ts/.js/.rs/.py/.go files present in diff)

@github-actions

Copy link
Copy Markdown
Name Max Mem (Kb) Encode Decode
blob 4_224 4_207_512 2_114_978
btreemap 75_456 529_878_602 10_089_653_013
double_option 128 1_370_957 25_033_561 ($\textcolor{red}{0.06\%}$)
int_bignum 1_472 284_867_139 191_054_354
large_variant 320 1_065_025 18_054_948 ($\textcolor{red}{0.05\%}$)
multi_arg 64 551_844 3_930_076
nat_bignum 960 66_527_938 188_956_582
nns 192 2_020_567 ($\textcolor{green}{-0.01\%}$) 4_963_289 ($\textcolor{red}{0.03\%}$)
nns_list_neurons 1_152 6_602_230 ($\textcolor{red}{0.01\%}$) 208_129_595
nns_list_proposal 1_216 6_946_737 ($\textcolor{red}{0.02\%}$) 53_725_152
option_list 128 737_895 16_265_446
result_variant 192 1_403_274 14_460_292 ($\textcolor{red}{0.06\%}$)
subtype_decode 512 2_666_582 46_030_165
text 6_336 4_204_364 7_872_925
variant_list 128 726_255 15_275_408
vec_int16 12_480 8_404_683 249_579_205
vec_nat 11_008 66_046_977 275_498_537
vec_nat32 24_768 16_793_291 243_288_025
vec_nat64 49_344 33_570_491 251_676_892
vec_service 64 687_577 92_430_584 ($\textcolor{green}{-0.00\%}$)
wide_record 1_152 3_191_287 44_525_322
  • Parser cost: 15_784_968
  • Extra args: 2_670_299
Click to see raw report
---------------------------------------------------

Benchmark: blob
  total:
    instructions: 6.33 M (no change)
    heap_increase: 66 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 4.21 M (no change)
    heap_increase: 66 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 2.11 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: btreemap
  total:
    instructions: 10.62 B (no change)
    heap_increase: 1179 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 529.88 M (no change)
    heap_increase: 159 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 10.09 B (no change)
    heap_increase: 1020 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: double_option
  total:
    instructions: 26.41 M (0.06%) (change within noise threshold)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 1.37 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

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

Benchmark: extra_args
  total:
    instructions: 2.67 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: int_bignum
  total:
    instructions: 475.92 M (no change)
    heap_increase: 23 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 284.87 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 191.05 M (no change)
    heap_increase: 23 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: large_variant
  total:
    instructions: 19.12 M (0.04%) (change within noise threshold)
    heap_increase: 5 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 1.07 M (no change)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 18.05 M (0.05%) (change within noise threshold)
    heap_increase: 3 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: multi_arg
  total:
    instructions: 4.48 M (no change)
    heap_increase: 1 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 551.84 K (no change)
    heap_increase: 1 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 3.93 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: nat_bignum
  total:
    instructions: 255.49 M (no change)
    heap_increase: 15 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 66.53 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 188.96 M (no change)
    heap_increase: 15 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: nns
  total:
    instructions: 23.61 M (0.01%) (change within noise threshold)
    heap_increase: 3 pages (no change)
    stable_memory_increase: 0 pages (no change)

  0. Parsing (scope):
    calls: 1 (no change)
    instructions: 15.78 M (no change)
    heap_increase: 3 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 2.02 M (-0.01%) (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: 4.96 M (0.03%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: nns_list_neurons
  total:
    instructions: 214.73 M (0.00%) (change within noise threshold)
    heap_increase: 18 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 6.60 M (0.01%) (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: 208.13 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: nns_list_proposal
  total:
    instructions: 60.67 M (0.00%) (change within noise threshold)
    heap_increase: 19 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 6.95 M (0.02%) (change within noise threshold)
    heap_increase: 5 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 53.73 M (no change)
    heap_increase: 14 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: option_list
  total:
    instructions: 17.01 M (no change)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 737.89 K (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 16.27 M (no change)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: result_variant
  total:
    instructions: 15.87 M (0.05%) (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.40 M (no change)
    heap_increase: 1 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

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

Benchmark: subtype_decode
  total:
    instructions: 48.70 M (no change)
    heap_increase: 8 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 2.67 M (no change)
    heap_increase: 8 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 46.03 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: text
  total:
    instructions: 12.08 M (no change)
    heap_increase: 99 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 4.20 M (no change)
    heap_increase: 66 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 7.87 M (no change)
    heap_increase: 33 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: variant_list
  total:
    instructions: 16.00 M (no change)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 726.25 K (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 15.28 M (no change)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: vec_int16
  total:
    instructions: 257.99 M (no change)
    heap_increase: 195 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 8.40 M (no change)
    heap_increase: 130 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 249.58 M (no change)
    heap_increase: 65 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: vec_nat
  total:
    instructions: 341.55 M (no change)
    heap_increase: 172 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 66.05 M (no change)
    heap_increase: 33 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 275.50 M (no change)
    heap_increase: 139 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: vec_nat32
  total:
    instructions: 260.08 M (no change)
    heap_increase: 387 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 16.79 M (no change)
    heap_increase: 258 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 243.29 M (no change)
    heap_increase: 129 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: vec_nat64
  total:
    instructions: 285.25 M (no change)
    heap_increase: 771 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 33.57 M (no change)
    heap_increase: 514 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 251.68 M (no change)
    heap_increase: 257 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Benchmark: vec_service
  total:
    instructions: 93.12 M (-0.00%) (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: 687.58 K (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

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

Benchmark: wide_record
  total:
    instructions: 47.72 M (no change)
    heap_increase: 18 pages (no change)
    stable_memory_increase: 0 pages (no change)

  1. Encoding (scope):
    calls: 1 (no change)
    instructions: 3.19 M (no change)
    heap_increase: 18 pages (no change)
    stable_memory_increase: 0 pages (no change)

  2. Decoding (scope):
    calls: 1 (no change)
    instructions: 44.53 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

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

Summary:
  instructions:
    status:   No significant changes 👍
    counts:   [total 22 | regressed 0 | improved 0 | new 0 | unchanged 22]
    change:   [max +16.00K | p75 +437 | median 0 | p25 0 | min -3.00K]
    change %: [max +0.06% | p75 0.00% | median 0.00% | p25 0.00% | min -0.00%]

  heap_increase:
    status:   No significant changes 👍
    counts:   [total 22 | regressed 0 | improved 0 | new 0 | unchanged 22]
    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 22 | regressed 0 | improved 0 | new 0 | unchanged 22]
    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%]

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

lwshang and others added 2 commits July 27, 2026 17:57
v1 is a new major version of the existing candid / candid_parser /
candid_derive crates, not a new set of names. Those names are already
ours, and Cargo links semver-incompatible versions side by side, so
0.10.x and 1.x coexist in a dependency graph without renaming anything.

Replaces the previous claim that the derive macro needed a name other
than candid_derive, which was reasoning from a coexistence constraint
that does not exist.

Records the caveat that does apply: coexistence works for linking, not
for types, so a graph pulling both majors still breaks where
candid_0_10::Nat meets candid_1::Nat. Promoted to an open question,
since it is the hardest unsolved part of the migration.

Also documents candid_derive's own global-state defect, now that the
derive crate's future is discussed: candid_method / export_service
communicate across proc-macro invocations through a lazy_static! Mutex
that the code itself flags as unsound under incremental compilation
(rust-lang/rust#44034), with a silently truncated .did file as the
failure mode. Added to the crates/CLAUDE.md anti-pattern list.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
candid, candid_parser, candid_derive and ic_principal all use `_`;
the new layer crates now match. crates.io normalises the two spellings
for uniqueness, so publishing candid_types also reserves candid-types.

Closes the naming open question.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lwshang
lwshang marked this pull request as draft July 28, 2026 01:49
lwshang and others added 2 commits July 27, 2026 21:56
…isting files

Two changes, both about the document claiming less than it did.

"Charter" is an authorizing document signed by a sponsor. Nothing here
is authorized, so the word was inaccurate as well as presumptuous. The
document now says it proposes, its status reads "proposal, not scheduled
work", and section 5 is "Proposed working model" rather than "How we
work".

Dropped the changes to .github/CONTRIBUTING.md and README.md. Both were
edits to existing, team- and user-facing files, which the proposal itself
argues against: CONTRIBUTING.md told colleagues how to review merges that
have not been agreed to yet, and README.md announced on the repository's
front page that a rewrite was "under way" when three empty directories is
all that exists.

Those rules still belong in CONTRIBUTING.md eventually, but after the
working model is agreed, not as part of proposing it. The directories
carry their own "Status: reserved, empty" READMEs, which is enough for
anyone who stumbles across them in the meantime.

The pull request is now purely additive and modifies no existing file,
which is the property section 5 asks for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Four corrections, all removing claims the document could not support.

Dropped the opening paragraph attributing candid to the Languages team
and its move to Caffeine. It is org history, not evidence, and it framed
the problems as somebody's fault rather than as facts about the code.
It also claimed maintenance sits "with one person", which is wrong —
PRs here are reviewed by teammates. Section 1 now just states that there
are six problems and that each is cited.

The same paragraph said "Five specific problems" while section 1 has six
subsections.

Section 3 said "Nobody on SDK knows Lean today." That overstates the
risk in one direction while the bus-factor note ("committing to learn")
understated the starting point in the other. It now says Lean is not
used in the team's stack today and that this would be a first
application of it here, which is accurate without implying either
expertise or a standing start.

Replaced the remaining dfx references with icp-cli, which supersedes it.
The candid_ui note no longer names a tool, since the claim only needs to
be that developer tooling points users at that canister.

Removed section 8, "Feedback". Asking people to argue with three named
decisions belongs in a pull request description, where it is bounded by
review; persisted in the document it invites re-litigating settled
points indefinitely and leaves it ambiguous whether work should stop
while that happens. Section 7 now opens by drawing the line instead:
section 7 is what is open, sections 1-6 are decisions recorded with
their reasoning, and new evidence is the reason to revisit one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lwshang lwshang changed the title docs: charter for the staged Candid v1 rewrite docs: propose a staged, additive rewrite of candid Jul 28, 2026
lwshang and others added 4 commits July 28, 2026 09:33
Picks up the CI workflow overhaul (#757). candid-ui.yml was renamed to
candid-ui-release.yml there; the reference in REWRITE.md is fixed in the
next commit.
candid-ui.yml became candid-ui-release.yml under the naming convention
adopted in #757.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The previous wording lumped tools/candiff and tools/didc together as
things to move to another repo, which was wrong in both directions.

candiff was already deprecated in #405 and the directory is a single
README saying so; it just goes. didc is a general Candid CLI and belongs
in this repo, with a narrower scope after the split — parse, check,
encode, decode, subtype checks, but no per-language binding generation,
which leaves with the bindgen crates. tools/ui moves to its own
repository, as a deployed canister with its own release pipeline.

tools/didc-js is left open, with the reasoning in section 7: it publishes
the Rust implementation as @dfinity/didc for JavaScript, has been at
0.0.4 with no functional change since #602, and overlaps @dfinity/candid
from agent-js, so two DFINITY Candid libraries for one language can
disagree with nothing checking that they don't.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The entry claimed one resolution could be that @dfinity/candid is shown
to conform and the wasm build is therefore redundant. That is not
possible: @dfinity/candid is a codec over programmatically constructed
IDL types and has no .did parser, so it cannot replace a parser no matter
how conformant its codec is. Checked against @dfinity/candid 2.1.3 —
its surface is the IDL constructors, encode/decode, the UI helpers, and
hash/leb128/buffer utilities, with no lexer or grammar anywhere.

The two packages overlap only at encode/decode, which is still worth
noting because two independent implementations exist there with nothing
checking they agree. But the open question is not "which one survives" —
it is whether this repo publishes a JS binding at all, and if so whether
it exposes more than the method-name list it exposes today.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant