- Bug fixes:
- Escape the method names of a service type in the Rust binding. A Candid method name is an arbitrary text value, but
pp_ty_serviceemitted it raw between the quotes of a Rust string literal insidecandid::define_service!. A name containing"therefore closed the literal and the macro invocation, and the rest of the name was compiled as Rust — a.didfile could inject arbitrary items into the bindings generated from it, and from there into the consumer's binary. Names are now escaped withescape_debug, aspp_functionand the#[serde(rename)]attributes already were. The value seen bydefine_service!is unchanged, and names that are ordinary identifiers generate byte-identical output.
- Escape the method names of a service type in the Rust binding. A Candid method name is an arbitrary text value, but
- 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.
- Bug fixes:
- Fix decoding a
vecof 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 implementdeserialize_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()reportingtruefor elements of avecof fixed-width primitives, also since 0.10.27. The bulk decode fast path inherited serde's default from the same value deserializers, so aDeserializeimpl that branches on it took its human-readable path inside avecwhile taking the binary path everywhere else, silently decoding to a different value with no error. It now reportsfalsefor the whole decoder, as candid is a binary format.
- Fix decoding a
-
Breaking changes:
-
Migrated from the deprecated
binreadcrate to its successorbinrw. The types in thecandid::binary_parsermodule (Header,PrincipalBytes,Len,BoolValue) now implementbinrw::BinReadinstead ofbinread::BinRead, andFrom<binread::Error> for candid::Erroris replaced byFrom<binrw::Error>.Released as a patch rather than a minor bump because the affected surface is limited to those trait impls.
binary_parseris an internal wire-format parsing module that ispubonly 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 onbinreaddirectly 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
binrwmigration, which dropsbinread'sdebug_templatecodegen: 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.xdependency tree thatbinread_derivepinned (along withrustversion). - A future unrecognized
binrw::Errorvariant now degrades to a label-less error instead of panicking, sincebinrw::Erroris#[non_exhaustive]and decoding runs on untrusted input.
- Decoding is faster as a side effect of the
- Non-breaking changes:
- A service reference now decodes where a
principalis expected:service <actortype>is a subtype ofprincipal(spec addition:service <: principal, modelled analogously tonat <: int). The subtype checker and the deserializer accept a service reference at typeprincipal; the two share an identical wire encoding, so the coercion is the identity on the reference. The reverse (aprincipalat aservicetype) remains rejected.
- A service reference now decodes where a
- Non-breaking changes:
- Make
Principal::as_slice(),Principal::len()andPrincipal::as_fixed_bytes()const functions.
- Make
- Non-breaking changes:
- Add
Principal::as_fixed_bytes(), returning a reference to the underlying fixed-size[u8; MAX_LENGTH_IN_BYTES]backing array. Bytes at indexlen()and beyond are always zero. - Add
Principal::len(), returning the number of significant bytes in thePrincipal(equivalent toas_slice().len()).
- Add
- Non-breaking changes:
- Encode and decode large
Nat/Intvalues in linear time. Values beyond theu64/i64fast 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.
- Encode and decode large
- Non-breaking changes:
- Upgrade candid_parser dependency to v0.4.0.
- Non-breaking changes:
- Add
pretty::utils::sep_encloseandsep_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.
- Add
- Breaking changes:
- Parse and preserve named function arguments and results. The AST now carries argument names so consumers (e.g. binding generators) can emit meaningful parameter names:
- New
syntax::IDLArgType { typ: IDLType, name: Option<String> }withIDLArgType::new/IDLArgType::new_with_name. Purely numeric names are normalized toNone. syntax::FuncType::{args, rets},syntax::IDLType::ClassT,syntax::IDLTypes::args, andsyntax::IDLInitArgs::argsnow holdVec<IDLArgType>instead ofVec<IDLType>.- The pretty-printer now round-trips argument names (e.g.
(from : principal)).
- New
- Type checking is unchanged: names are dropped when lowering to
candid::types::Function, so thecandidcrate is unaffected.
- Parse and preserve named function arguments and results. The AST now carries argument names so consumers (e.g. binding generators) can emit meaningful parameter names:
- Bug fixes:
- Fix
text_fast_pathleakage 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
- Fix
- Bug fixes:
- Fix LEB128/SLEB128 fast path silently truncating
Nat/Intvalues near theu64/i64boundary during decoding - Fix
Int::decodetruncating large magnitudes due to fast-path leakage
- Fix LEB128/SLEB128 fast path silently truncating
- Bug fixes:
- Motoko binding: emit
Float32for Candidfloat32instead of panicking.float32support was added to Motoko in version 1.4.0.
- Motoko binding: emit
- Non-breaking changes:
didc checknow reports all incompatible changes at once, grouped by method, instead of stopping at the first error- Clearer error messages: e.g. "missing in new interface" and "function annotation changed from query to update"
- Non-breaking changes:
- Add
service_compatibility_report()returning a full grouped compatibility report as a string
- Add
- Non-breaking changes:
- Add
subtype_check_all()to collect all subtype errors in one pass (previously stopped at the first) - Add
Incompatibilitytype andformat_report()for structured, hierarchical error reporting
- Add
- Bug fixes:
- Fix decoding failure when a trailing argument is a primitive vector
- Non-breaking changes:
- Preserve Rust doc comments on exported Candid types, record fields, and variant members when generating
.didfiles via#[derive(CandidType)]
- Preserve Rust doc comments on exported Candid types, record fields, and variant members when generating
- Non-breaking changes:
- Implement
DataSizeforPrincipal, enablingPrincipalas an element type inBoundedVec
- Implement
- Non-breaking changes:
- Add
BoundedVectype tocandid::types::bounded_vecfor bounding a vector by number of elements, total data size, and per-element data size during deserialization
- Add
- 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 (
RecursionDepthwithDepthGuard) for automatic depth management, eliminating manual increment/decrement operations
- Use
- Enhance recursion guard
- Non-breaking changes:
- Add
max_type_lentoDecoderConfigto configure the type table size limit (default: 10,000) during binary parsing.
- Add
- Breaking changes:
- Changed imports generated by
candid_parser::bindings::typescript::compilefrom@dfinity/*to@icp-sdk/core/*
- Changed imports generated by
- Non-breaking changes:
- Implement
rangemap::StepLiteforPrincipal(requires the optionalrangemapfeature flag)
- Implement
- Non-breaking changes:
- fix: escape
*/to prevent premature JS doc comment termination
- fix: escape
- Non-breaking changes:
- fix: subtyping and coercion rules for optional types
- fix: coercion of values into nested optional types
- fix: values of types
reservedat any context do not coerce into values of typenull - fix: missing record fields of type
nullin the textual format are decoded into a default value
- Non-breaking changes:
- Rust binding: Sets
service_namebased on top level name config - Rust binding: Makes struct field and function names are more intuitive and predictable.
- Rust binding convert identifiers into cases conforms to Rust naming convention.
Since
didcv0.5, some identifiers started to be renamed. E.g. struct fieldamount_e8swas renamed toamount_e_8_s. Now, field name likeamount_e8swon't be renamed. - Please check
to_identifier_case()in rust/candid_parser/src/bindings/rust/identifier.rs for more details. - Note: different identifiers might be converted to the same one, potentially causing naming conflicts. If this happens, you'll need to use the Type Selector Config to specify custom names.
- Rust binding convert identifiers into cases conforms to Rust naming convention.
Since
- Rust binding: Sets
- Non-breaking changes:
- fix: ignore inline comments or separated by newlines
- Non-breaking changes:
- fix: ignore inline comments or separated by newlines
- Non-breaking changes:
- Fixes a compatibility issue with
serdev1.0.220 and later.
- Fixes a compatibility issue with
- Non-breaking changes:
- Implement
serde::SerializeandPartialOrd,Ord,Hashfor theReservedtype.
- Implement
- Non-breaking changes:
- Fixes a regression in pretty printing when concatenating an empty list of documents
- Non-breaking changes:
- Makes the warning message for the special opt subtyping rule more explicit in the
candid::types::subtype::subtypeandcandid::types::subtype::subtype_with_configfunctions. - Added
pp_label_rawinpretty::candidmodule.
- Makes the warning message for the special opt subtyping rule more explicit in the
-
Breaking changes:
- The
candid_parser::typesmodule has been renamed tocandid_parser::syntax.
- The
-
Non-breaking changes:
-
Supports collecting line comments as doc comments in the following cases:
- above services:
// This is a valid doc comment for the service service : { greet : (text) -> (text); } - above actor methods:
service : { // This is a valid doc comment for greet greet : (text) -> (text); } - above type declarations:
// This is a valid doc comment for type A type A = record { my_field : text; }; - above record and variant fields:
type A = record { // This is a valid doc comment for my_field my_field : text; }; type B = record { // This is a valid doc comment for nat element nat; text; } type C = variant { // This is a valid doc comment for my_variant_field my_variant_field : nat; };
- above services:
-
Adds the
IDLMergedProgstruct, used to collect the syntax types when parsing Candid declarations. -
Supports reflecting doc comments from Candid declarations to the generated bindings. To enable this feature, we had to change the following:
- The
candid_parser::bindings::motoko::compilefunction now takes an additional&IDLMergedProgparameter. - The
candid_parser::bindings::rust::compilefunction now takes an additional&IDLMergedProgparameter. - The
candid_parser::bindings::typescript::compilefunction now takes an additional&IDLMergedProgparameter. - The
candid::pretty::syntaxmodule has been added. It exposes thepretty_printfunction, which is used to pretty print theIDLMergedProgstruct. The behavior is similar to the already existingcandid::pretty::candid::compilefunction, but uses the syntax types instead of the candid types.
- The
-
Supports reflecting doc comments from Rust canister methods to the Candid generated bindings. Example:
/// Doc comment for greet, /// even on multiple lines #[candid_method(query)] fn greet(name: &str) -> String { format!("Hello, {name}!") }
The generated Candid bindings will then look like this:
service : { // Doc comment for greet, // even on multiple lines greet : (text) -> (text); }To support this feature, hhe following have been added:
candid::pretty::candid::DocCommentsstruct, which is used to collect doc comments from Rust canister methods, in thecandid_derive::export_servicemacro.candid::pretty::candid::compile_with_docsfunction, which takes a&DocCommentsparameter.
-
- Starting this release, candid_derive is versioned in lockstep with candid.
- Keeps argument names for Rust functions.
- Breaking changes:
- The
didc testsubcommand has been removed.
- The
The source code of this tool has been removed, as it was deprecated in PR#405.
- Add a series of decoder functions which provide convenience for ic-cdk macros usage.
- Add
ArgumentEncoder::encode_ref,utils::{write_args, encode_args}that don't consume the value when encoding.
- Implement
CandidTypeforstd::marker::PhantomData.
- Add
IDLBuilder.try_reserve_value_serializer_capacity()to reserve capacity before serializing a large amount of data.
- Add
candid::MotokoResulttype. Usemotoko_result.into_result()to convert the value into Rust result, andrust_result.into()to get Motoko result.
- Breaking changes:
- Rewrite
configsandrandommodules, adapting TOML format as the parser.configsmodule is no longer under a feature flag, and no longer depend on dhall. - Rewrite Rust bindgen to use the new
configsmodule. Useemit_bindgento generate type bindings, and useoutput_handlebarto provide a handlebar template for the generated module.compilefunction provides a default template. The generated file without config is exactly the same as before.
- Rewrite
- Non-breaking changes:
utils::check_rust_typefunction to check if a Rust type implements the provided candid type.
- Switch
HashMaptoBTreeMapin serialization andT::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
CandidTypeforserde_bytes::ByteArray - Add
pretty::candid::pp_init_argsfunction to pretty print init args
- 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_configandIDLArgs::from_bytes_with_config. The original decoding method remains to be non-metered.
- Fix Typescript binding for init args.
- Fix parser when converting
vec { number }intoblobtype.
- Add Typescript binding for init args.
- Fix HTTP header.
- Fix agent routing when running in remote environments.
- Fix display
IDLValue::Blobto allow "\n\t" in ascii characters.
- Add an "assist" feature. Given a type, construct Candid value in the terminal with interactive dialogue.
- Add
didc assistcommand. - Fix
didc decode --format blob.
- Add
candid::types::value::try_from_candid_typeto convert Rust type toIDLValue. - Display
IDLValue::Blobin ascii character only when the whole blob are ascii characters.
- Add
import servicein parser to allow merging services.
- Export
PRINCIPAL_MAX_LENGTHas a public constant. - Make all dependencies optional.
- Add II integration with URL parameter
iiandorigin.
- The original
candidcrate is split into three crates:candid: mainly for Candid data (de-)serialization.candid::bindings::candidmoves tocandid::pretty::candid.candid::prettymoves tocandid::pretty::utils. These modules are only available under feature flagprinter(enabled by default).candid::{Int, Nat}is only available under feature flagbignum(enabled by default). If this feature is not enabled, you can usei128/u128forint/nattype.- Remove operator for
i32andNat. - Add
IDLValue::Blob(Vec<u8>)enum for efficient handling of blob value. candid::types::number::pp_num_strmoves tocandid::utils::pp_num_str.candid::types::valuemodule is only availble under feature flagvalue.mute_warningfeature flag is removed, usecandid::types::subtype_with_configinstead.
candid_parser: used to be theparserandbindingsmodule incandidcrate.- Remove
FromStrtrait forIDLArgsandIDLValue. Useparse_idl_argsandparse_idl_valuerespectively instead. TypeEnv.ast_to_typebecomescandid_parser::typing::ast_to_type.bindings::rust::Configuses builder pattern.candidis re-exported incandid_parser::candid.candid::*is re-exported incandid_parser.
- Remove
ic_principal: only forPrincipalandPrincipalError.
- Add
candid::types::subtype_with_configto control the error reporting level of special opt rule. - Add
Type.is_blob(env)method to check if a type is a blob type. - Fix TS binding for
variant {}.
- Set different config values for
full_error_messageandzero_sized_valuesfor Wasm and non-Wasm target. - Fix subtyping error message for empty type.
- Remove name duplication check in
candid_methodto avoid errors on certain IDEs. - Improvements in Candid UI
- Add II button, thanks to @Web3NL.
- Support streaming download of profiling data.
- Implement
CandidTypeforstd::cmp::Reverse. - Rust codegen: add
pubfor struct fields. - Fix
merge_init_typesandinstantiate_candidwhen the main actor refers to a variable.
- Draw flamegraph for canister upgrade
- Upstream fix from
merge_init_types
- Add
utils::merge_init_argsto parse and mergecandid:argsmetadata, and add the same endpoint in Candid UI. - Add
record!andvariant!macro to generate record and variant type AST. - Allow trailing comma in
func!macro. - Add
minize_error_messagetoIDLDeserialize::Config.
- Improve Rust binding generation: 1) Fix generated code for agent; 2) Generated names conform to Rust convention: Pascal case for type names and enum tags; snake case for function names.
- Fix a bug when deriving empty struct/tuple enum tag, e.g.,
#[derive(CandidType)] enum T { A{}, B() }. - Add
IDLDeserialize::new_with_configto control deserializer behavior. For now, you can only bound the size of zero sized values.
- Fix error message for
subtype::equalto report the correct missing label. - Recover subtype error from custom deserializer. This fixes some custom types for not applying special opt rule.
- Fix Candid UI to support composite query.
- Internally, move away from
BigInt::try_intoto allow more build targets, e.g. WASI and iOS. - Spec change: allow
record {} <: record {null}. - Fix length counting of zero sized values.
- Remove
arc_typefeature.
utils::service_equalto check if two service are structurally equal under variable renaming.utils::instantiate_candidto generate metadata from did file: separate init args, flatten imports. For now, comments in the original did file is not preserved.impl From<Func/Service>trait fordefine_function/define_servicemacros.- Make
bindings::candid::pp_argsa public method. - Bump dependencies, notably
pretty,logosandsyn.
- Bump agent-js to fix the new response code change
- Bump candid to 0.9
- Add a strict mode for
didc checkwhich checks for structural equality instead of backward compatibility.
- Deserializer only checks subtyping for reference types, fully conforming to Candid spec 1.4. You can now decode
opt varianteven if the variant tags are not the same, allowing upgrading variant types without breaking the client code. - The old
candid::Typeis nowcandid::TypeInner, andTypeis a newtype ofRc<TypeInner>. This change significantly improves deserialization performance (25% -- 50% improvements) candid::parsermodule is only available under feature flag"parser". This significantly cuts down compilation time and Wasm binary size- Disable the use of
candid::Funcandcandid::Serviceto avoid footguns. Usedefine_function!anddefine_service!macro instead candid::parser::typing::TypeEnvmoved tocandid::types::TypeEnv. Use ofcandid::TypeEnvis not affectedcandid::parser::types::FuncModemoved tocandid::types::FuncModecandid::parser::valuemoved tocandid::types::valuecandid::parser::prettymoved tocandid::bindings::candid::value- Deprecate
ToDoctrait for pretty printingIDLProg, usecandid::bindings::candidmodule instead - Deprecate
candid::codegen, usecandid::bindingsinstead - In
candid::bindings::rust, there is aConfigstruct to control how Rust bindings are generated
- Macros for constructing type AST nodes:
service!,func!andfield! - Support future types
- Bound recursion depth in deserialization for non-Wasm target (Wasm canister doesn't have a specified C ABI, and runs in a sandbox. It's okay to stack overflow)
- Limit the size of vec null/reversed in deserialization
Natserialization for JSON and CBOR- Support custom candid path for
export_service! - Support
composite_queryfunction annotation
- Bug fix in TS bindings
- Pretty print numbers
- Downgrade
serde_dhallfor license issue.
- Fix: missing impl serde traits for
Principal
- Move
Principalinto this crate, no more re-exportic-types
- Bump
ic-typesto0.5(fixinglookup_pathfor hash trees)
- Implement
CandidTypeforRcandArc - Fix TS binding for TypedArray
- Fix float tokenizer
- Derive
SerializeforIntandNat
- Fix parser: underscore for hexnum; semicolon at the EOF
- Fix semicolon in Rust binding
- Derive
Copy,Eq,DefaultforReserved - Bump
ic-typesto0.4
- Fetch did file from canister metadata
- Deprecate
localhost/_/candidendpoint - Fetch name section from metadata (instrumented code)
- Bug fix for encoding
vec nat8types - Disable profiler for query methods
- Update service methods in TS bindings to use ActorMethod, the type used by agent-js's Actor class
- Infer the type of
vec {}tovec emptyto satisfy subtype checking - Expose more internal structures
- Bump ic-types to 0.3
candid::utils::service_compatibleto check for upgrade compatibility of two service types
- Generate Rust binding from Candid file (experimental)
- Ignore init args for subtype checking
- Pretty print text value with escape_debug
- More visitors for Nat and Int type
- Flamegraph when profiling feature is enabled
- Fix
subtypefunction to take only one env. To check subtyping from two did files, useenv.merge_type(env2, ty2)to merge the env and rename variable names.
- Release ARM binary for
didc - Refine the spec for opt rules
- Support import when parsing did files with
check_filefunction - Fix TypeScript binding for reference types
- Report profiling info when
__get_cyclesmethod is available - Add binding generation and subtype checking for Candid UI canister
- Update TypeScript binding to better integrate with dfx
- Set
is_human_readableto false in Deserializer
- Update JS binding to use
Principalfrom@dfinity/principal - Add
#[candid_path("path_to_candid")]helper attribute to the candid derive macro - Update
ic-typesto 0.2.0
- Update spec to introduce subtyping check in deserialization #168
- Coq proof for subtype check
- Update test suite to conform with the new spec
- Require full subtype checking in deserialization. This removes undefined behavior when trying to decode variant and empty vector at types that are not supertype of the wire type.
- Deserialization requires both
DeserializeandCandidTypetrait. de::ArgumentDecoder,ser::ArgumentEncodermoved toutils::{ArgumentDecoder, ArgumentEncoder}.types::subtypereturnsResult<()>instead ofboolfor better error message.- Disable subtyping conversion for opt rules in
IDLValue.annotate_type. - Display type annotations for number types.
- Better error messages in deserialization
- Remove unnessary
reqwestdependency - Implement CandidType for
str
didc bindto support Motoko bindingsdidc hashto compute hash of a field namedidc decodecan decode blob format- Candid UI canister
- Fix a bug for serializing recursive values in Rust CDK #210
- Use BigInt in JS/TS binding
- Fix TypeScript binding for tuple
- Rust support for Func and Service value
#[candid_method(init)]to support init arguments in service actor- Subtyping check for Candid types
- Handle subtyping for
reservedandintin decoding
- Benchmark for Rust library with criterion
didc checkanddidc subtypecommand to check for subtyping- Conditional running CI for Coq or Rust library
- Support
serde_bytesfor efficient handling of&[u8]andVec<u8>
- Typescript binding for Candid
- Support more native Rust types: Path, PathBuf, VecDeque, LinkedList, BinaryHeap, Cow, Cell, RefCell
- Documentation for type mapping and howto section
didc bindto generate typescript binding
- Generate random Candid values
- Sort method names lexicographically
- Candid user guide
- More Coq proof for MiniCandid
didc randomcommand and an experimental config file
- Better pretty printer for Candid value
- Support reference types
- Support more native Rust types: HashMap, HashSet, BTreeMap, BTreeSet, i128, u128
- Bug fix for empty record detection when deserializing to native Rust types
- Test suites for reference types
didc encodesupports outputing blob format
- Bug fix for opt subtyping
- Formalize definitions of IDL-soundness in Coq
- Support the opt subtyping rules
- Allow using Rust keyword as field label
- Add opt subtyping tests
- Rewrite description of deserialization #128
- Add result getter for serializer
- Implement CandidType for std::time::SystemTime and Duration
- Support service constructor
- Export
inittypes in JS binding for service constructor - Improve pretty-printing for Candid values: underscore for numerals, blob shorthand for
vec nat8. - Disable pretty-printing for large vectors.
- Add attribute
#[candid_method]to derive Candid types for functions. - Add a feature flag
cdkto generate candid path specifically for Rust CDK.
- Candid UI canister to render a web UI for all running canisters on the network.
- Fix a bug when decoding nested record values.
- Add
encode_argsanddecode_argsfunctions to encode/decode sequence of arguments.
- Use
ic-typesfor Principal (breaking change) - Support type annotations in parsing Candid values
- Support float e notation
- Support nested comments
- Pretty print decoded candid values
- New lexer using the
logoscrate - Use
codespan-reportingto report Rust-like parsing errors
- Fix deserialization to validate type table and detect infinite loop in
type T = record { T } - Fix serialization for newtype struct
- Display trait for pretty printing
types::Type
- More test suites for prim and construct types
- Tools for emitting JavaScript tests from Candid test suites
- Publish
didcandcandiffbinary in the release - Generate JS tests from the Candid test suites
- No longer requires the shortest LEB128 number in deserialization #79
- Parser improvements:
- Floats in fractional number, no e-notation yet
- Comments (no nested comments)
- Blob shorthand for
vec nat8value - Fix text parser to valiate utf-8 encoding
- Bounds check for bool and text
- Type annotation for reserved
- Initial commit for didc and candiff tools
- Add Candid test suite