PackageTrack
Sign in Get early access

candid

Candid is an interface description language (IDL) for interacting with canisters running on the Internet Computer.

0.10.35 4.9M downloads/mo #4567 most downloaded on crates.io dfinity/candid

What this package is like to depend on

Last release 12 days ago

11 Aug 2026

Release timing varies

gaps range from 2 weeks to 4 months

Some releases are documented

notes for 42 of 109 stable releases

4 versions withdrawn

withdrawn after publishing

6 years old

119 releases · first in 2020

18 releases in the last 12 months

see the full history below

Release timeline

119 releases · May 2020 to Aug 2026
2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 119
  1. 0.10.35 11 Aug 2026
    Release notes
    • Bug fixes:
      • Bound the allocation when reading a length-prefixed byte field in the type-table header. A byte vector (a future type's payload, or a service method's name) previously reserved its full declared length up front, so a length larger than the remaining input requested a correspondingly large allocation instead of failing on the short read. These fields now grow their buffer incrementally, so an out-of-range or truncated length surfaces as an ordinary parse error. The wire format is unchanged and valid messages decode identically.

    2026-07-27

    Open source →
  2. 0.10.34 27 Jul 2026
    Release notes
    • Bug fixes:
      • Fix decoding a vec of fixed-width primitives into newtype elements (e.g. struct EventIndex(u32)), which failed with a spurious subtyping error since 0.10.27. The bulk decode fast path fed each element through serde's value deserializers, which do not implement deserialize_newtype_struct; they now go through a wrapper that forwards it, as the main deserializer does. Nested newtypes are unwrapped recursively.
      • Fix is_human_readable() reporting true for elements of a vec of fixed-width primitives, also since 0.10.27. The bulk decode fast path inherited serde's default from the same value deserializers, so a Deserialize impl that branches on it took its human-readable path inside a vec while taking the binary path everywhere else, silently decoding to a different value with no error. It now reports false for the whole decoder, as candid is a binary format.
    Open source →
  3. 0.10.33 27 Jul 2026
    Release notes
    • Breaking changes:

      • Migrated from the deprecated binread crate to its successor binrw. The types in the candid::binary_parser module (Header, PrincipalBytes, Len, BoolValue) now implement binrw::BinRead instead of binread::BinRead, and From<binread::Error> for candid::Error is replaced by From<binrw::Error>.

        Released as a patch rather than a minor bump because the affected surface is limited to those trait impls. binary_parser is an internal wire-format parsing module that is pub only incidentally — it is used nowhere outside candid's own deserializer, and it is now #[doc(hidden)] to say so. Code is affected only if it depends on binread directly and names these impls; the wire format, decoder error messages, byte offsets, type layouts, and all function signatures are unchanged, so the worst case is a compile error rather than a behaviour change.

    • Non-breaking changes:

      • Decoding is faster as a side effect of the binrw migration, which drops binread's debug_template codegen: up to 37% fewer instructions on variant-heavy payloads (multi_arg −36.6%, result_variant −10.3%, large_variant −9.5%, subtype_decode −8.0%, double_option −7.0%), with no regressions.
      • Dropped the duplicate syn 1.x dependency tree that binread_derive pinned (along with rustversion).
      • A future unrecognized binrw::Error variant now degrades to a label-less error instead of panicking, since binrw::Error is #[non_exhaustive] and decoding runs on untrusted input.

    2026-07-06

    Open source →
  4. 0.10.32 06 Jul 2026
    Release notes
    • Non-breaking changes:
      • A service reference now decodes where a principal is expected: service <actortype> is a subtype of principal (spec addition: service <: principal, modelled analogously to nat <: int). The subtype checker and the deserializer accept a service reference at type principal; the two share an identical wire encoding, so the coercion is the identity on the reference. The reverse (a principal at a service type) remains rejected.

    2026-07-03

    Open source →
  5. 0.10.31 25 Jun 2026
    Release notes
    • Non-breaking changes:
      • Encode and decode large Nat/Int values in linear time. Values beyond the u64/i64 fast path were previously processed one LEB128/SLEB128 group at a time, shifting the whole bignum on every byte (O(n²) in the encoded length); they now build the value in a single O(n) pass.
    Open source →
  6. 0.10.30 23 Jun 2026
    Release notes
    • Non-breaking changes:
      • Add pretty::utils::sep_enclose and sep_enclose_space: list/tuple pretty-printing combinators that separate items and enclose them in delimiters, emitting a trailing separator on multi-line layouts.
      • Add TypeEnv::to_sorted_iter() to iterate bindings in a deterministic, key-sorted order.
    Open source →
  7. 0.10.29 27 May 2026
    Release notes
    • Bug fixes:
      • Fix text_fast_path leakage between nested maps: an inner map with non-text keys would fail with a "Type mismatch" error when enclosed in an outer map with text keys

    2026-05-20

    Open source →
  8. 0.10.28 20 May 2026
    Release notes
    • Bug fixes:
      • Fix LEB128/SLEB128 fast path silently truncating Nat/Int values near the u64/i64 boundary during decoding
      • Fix Int::decode truncating large magnitudes due to fast-path leakage
    Open source →
  9. 0.10.27 08 Apr 2026 withdrawn
    Release notes
    • Non-breaking changes:
      • Add subtype_check_all() to collect all subtype errors in one pass (previously stopped at the first)
      • Add Incompatibility type and format_report() for structured, hierarchical error reporting

    2026-03-18

    Open source →
  10. 0.10.26 18 Mar 2026
    Release notes
    • Bug fixes:
      • Fix decoding failure when a trailing argument is a primitive vector

    2026-03-16

    Open source →
  11. 0.10.25 16 Mar 2026
    Release notes
    • Non-breaking changes:
      • Preserve Rust doc comments on exported Candid types, record fields, and variant members when generating .did files via #[derive(CandidType)]

    2026-02-27

    Open source →
  12. 0.10.24 27 Feb 2026
    Release notes
    • Non-breaking changes:
      • Implement DataSize for Principal, enabling Principal as an element type in BoundedVec

    2026-02-20

    Open source →
  13. 0.10.23 20 Feb 2026
    Release notes
    • Non-breaking changes:
      • Add BoundedVec type to candid::types::bounded_vec for bounding a vector by number of elements, total data size, and per-element data size during deserialization

    2026-02-10

    Open source →
  14. 0.10.22 10 Feb 2026
    Release notes
    • Non-breaking changes:
      • Enhance recursion guard
        • Use target_family = "wasm" for platform detection to cover both wasm32 and wasm64; skip recursion check on wasm (sandboxed), use stack-based check on native platforms and a conservative depth limit on other niche platforms
        • Apply recursion guard to all recursive functions on deserialization path: type environment operations (TypeEnv::is_empty, trace_type, rec_find_type, as_func, as_service), value type annotation (IDLValue::annotate_type), subtype checking (subtype_(), equal()), and all deserializer methods (deserialize_option, deserialize_seq, deserialize_map, deserialize_tuple, deserialize_tuple_struct, deserialize_struct, deserialize_enum)
        • Refactor to use RAII guard pattern (RecursionDepth with DepthGuard) for automatic depth management, eliminating manual increment/decrement operations

    2026-02-03

    Open source →
  15. 0.10.21 03 Feb 2026
    Release notes
    • Non-breaking changes:
      • Add max_type_len to DecoderConfig to configure the type table size limit (default: 10,000) during binary parsing.

    2026-01-09

    Open source →
  16. 0.10.20 16 Oct 2025
    Release notes
    • Non-breaking changes:
      • fix: subtyping and coercion rules for optional types
      • fix: coercion of values into nested optional types
      • fix: values of types reserved at any context do not coerce into values of type null
      • fix: missing record fields of type null in the textual format are decoded into a default value
    Open source →
  17. 0.10.19 16 Sep 2025
    Release notes
    • Non-breaking changes:
      • Fixes a compatibility issue with serde v1.0.220 and later.

    2025-09-03

    Open source →
  18. 0.10.18 03 Sep 2025
    Release notes
    • Non-breaking changes:
      • Implement serde::Serialize and PartialOrd, Ord, Hash for the Reserved type.

    2025-08-04

    Open source →
  19. 0.10.17 04 Aug 2025
    Release notes
    • Non-breaking changes:
      • Fixes a regression in pretty printing when concatenating an empty list of documents

    2025-07-29

    Open source →
  20. 0.10.16 29 Jul 2025
    Release notes
    • Non-breaking changes:
      • Makes the warning message for the special opt subtyping rule more explicit in the candid::types::subtype::subtype and candid::types::subtype::subtype_with_config functions.
      • Added pp_label_raw in pretty::candid module.
    Open source →
  21. 0.10.15 25 Jul 2025 withdrawn

    Nothing published for this version

  22. 0.10.14 16 May 2025
    Release notes
    • Add a series of decoder functions which provide convenience for ic-cdk macros usage.

    2025-01-22

    Open source →
  23. 0.10.13 22 Jan 2025
    Release notes
    • Add ArgumentEncoder::encode_ref, utils::{write_args, encode_args} that don't consume the value when encoding.

    2025-01-15

    Open source →
  24. 0.10.12 15 Jan 2025
    Release notes
    • Implement CandidType for std::marker::PhantomData.

    2024-12-10

    Open source →
  25. 0.10.11 10 Dec 2024
    Release notes
    • Add IDLBuilder.try_reserve_value_serializer_capacity() to reserve capacity before serializing a large amount of data.

    2024-05-03

    Open source →
  26. 0.10.10 29 Jul 2024
    Release notes
    • Add candid::MotokoResult type. Use motoko_result.into_result() to convert the value into Rust result, and rust_result.into() to get Motoko result.
    Open source →
  27. 0.10.9 20 Jun 2024

    Nothing published for this version

  28. 0.10.8 03 May 2024

    Nothing published for this version

  29. 0.10.7 11 Apr 2024

    Nothing published for this version

  30. 0.10.6 25 Mar 2024

    Nothing published for this version

  31. 0.10.5 08 Mar 2024
    Release notes
    • Switch HashMap to BTreeMap in serialization and T::ty(). This leads to around 20% perf improvement for serializing complicated types.
    • Disable memoization for unrolled types in serialization to save cycle cost. In some cases, type table can get slightly larger, but it's worth the trade off.
    • Fix bug in text_size
    • Fix decoding cost calculation overflow
    • Fix length check in decoding principal type
    • Implement CandidType for serde_bytes::ByteArray
    • Add pretty::candid::pp_init_args function to pretty print init args

    2024-02-27

    Open source →
  32. 0.10.4 27 Feb 2024
    Release notes
    • 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.
    Open source →
  33. 0.10.3 30 Jan 2024
    Release notes
    • Fix parser when converting vec { number } into blob type.
    Open source →
  34. 0.10.2 03 Jan 2024
    Release notes
    • Fix display IDLValue::Blob to allow "\n\t" in ascii characters.
    Open source →
  35. 0.10.1 15 Dec 2023
    Release notes
    • Add candid::types::value::try_from_candid_type to convert Rust type to IDLValue.
    • Display IDLValue::Blob in ascii character only when the whole blob are ascii characters.
    Open source →
  36. 0.10.0 16 Nov 2023

    Nothing published for this version

  37. 0.9.11 23 Oct 2023

    Nothing published for this version

  38. 0.9.10 17 Oct 2023

    Nothing published for this version

  39. 0.9.9 04 Oct 2023

    Nothing published for this version

  40. 0.9.8 27 Sep 2023
    Release notes
    • Implement CandidType for std::cmp::Reverse.
    • Rust codegen: add pub for struct fields.
    • Fix merge_init_types and instantiate_candid when the main actor refers to a variable.
    Open source →
  41. 0.9.7 20 Sep 2023

    Nothing published for this version

  42. 0.9.6 06 Sep 2023

    Nothing published for this version

  43. 0.9.5 30 Aug 2023

    Nothing published for this version

  44. 0.9.4 30 Aug 2023

    Nothing published for this version

  45. 0.9.3 03 Aug 2023

    Nothing published for this version

  46. 0.9.2 25 Jul 2023

    Nothing published for this version

  47. 0.9.1 11 Jul 2023

    Nothing published for this version

  48. 0.9.0 01 Jul 2023

    Nothing published for this version

  49. 0.9.0-beta.4 23 May 2023 pre-release

    Nothing published for this version

  50. 0.9.0-beta.3 13 Apr 2023 pre-release

    Nothing published for this version

  51. 0.9.0-beta.2 03 Feb 2023 pre-release

    Nothing published for this version

  52. 0.9.0-beta.1 01 Feb 2023 pre-release

    Nothing published for this version

  53. 0.9.0-beta.0 28 Jan 2023 pre-release

    Nothing published for this version

  54. 0.8.4 17 Nov 2022

    Nothing published for this version

  55. 0.8.3 15 Oct 2022

    Nothing published for this version

  56. 0.8.2 06 Oct 2022

    Nothing published for this version

  57. 0.8.1 04 Oct 2022

    Nothing published for this version

  58. 0.8.0 28 Sep 2022

    Nothing published for this version

  59. 0.7.18 27 Sep 2022

    Nothing published for this version

  60. 0.7.17 22 Sep 2022

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive