Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dcSpark/cddl-codegen
/ functions
Functions
1,061 in github.com/dcSpark/cddl-codegen
⨍
Functions
1,061
◇
Types & classes
166
↓ 3 callers
Method
custom_serialize
(mut self, func: String)
src/generation.rs:103
↓ 3 callers
Function
decodeForeignEvidence
(fo?: ForeignOutcome)
cddl-matrix/verify.ts:919
↓ 3 callers
Function
decodeForeignProbe
(id: string, matrixExample: string)
cddl-matrix/verify.ts:901
↓ 3 callers
Method
deserialize_generated
(&self, name: &RustIdent)
src/generation.rs:3653
↓ 3 callers
Method
deserialize_generated_for_type
( &self, types: &IntermediateTypes, field_type: &ConceptualRustType, )
src/generation.rs:3657
↓ 3 callers
Method
dont_generate_deserialize
(&mut self, name: &RustIdent, reason: String)
src/generation.rs:3682
↓ 3 callers
Function
embedDetail
(detail: string, embedded?: boolean)
cddl-matrix/verify.ts:634
↓ 3 callers
Function
embedFallback
(id: string, example: string, cg: CodegenProbe, extraFlags: string[] = [])
cddl-matrix/verify.ts:613
↓ 3 callers
Function
empty_bar
Minimal bar decoded from hand-written CBOR: {1: null, "five": 5, "foo": 1337([]), "foo_map": {}}. Also the only profile-agnostic way to mint an empty
tests/multifile/tests.rs:41
↓ 3 callers
Function
encoding_fields_impl
( types: &IntermediateTypes, name: &str, ty: SerializingRustType, cli: &Cli, )
src/generation.rs:5169
↓ 3 callers
Method
expanded_mandatory_field_count
the minimum cbor length of this struct - can be useful for deserialization length checks does not count ANY type choice like types including Optional
src/intermediate.rs:1550
↓ 3 callers
Method
fixed_field_count
Some(count) if it always has the same number of fields (ie no optional fields), None otherwise
src/intermediate.rs:2896
↓ 3 callers
Function
flatten_group_entries
Flatten single-choice `GroupEntry::InlineGroup`s into the parent entry list. A parenthesized group in entry position — `[(a, b)]` — is pure grouping,
src/parsing.rs:1165
↓ 3 callers
Function
fmtDur
(ms: number)
check.ts:307
↓ 3 callers
Method
for_wasm_member
If we were to store a value directly in a wasm-wrapper, this would be used.
src/intermediate.rs:1934
↓ 3 callers
Function
generate
Generate a standalone crate's source map for `spec` (writes to a unique temp `.cddl`). `--wasm=false` EXPLICITLY (the CLI default is true): both layer
src/tests/identifier_hazard_tests.rs:141
↓ 3 callers
Method
generate_array_type
generate array type ie [Foo] generates Foos if not already created
src/generation.rs:3770
↓ 3 callers
Function
generated_source
Concatenate every generated file's source for `spec` (or panic with the generation error) — a coarse string surface for the fast-tier collision-proofi
src/tests/identifier_hazard_tests.rs:164
↓ 3 callers
Function
get_comments_if_group_parent
( parent_visitor: &'a ParentVisitor<'a, 'a>, cddl_type: &CDDLType<'a, 'a>, child: Option<&CDDLType
src/parsing.rs:2460
↓ 3 callers
Function
ident_to_primitive
(ident: &CDDLIdent)
src/parsing.rs:289
↓ 3 callers
Function
is_identifier_reserved
(name: &str)
src/utils.rs:123
↓ 3 callers
Function
is_identifier_user_defined
(name: &str)
src/utils.rs:187
↓ 3 callers
Function
is_pinned
(cell: &Cell)
src/tests/dsl_position_tests.rs:472
↓ 3 callers
Function
make_err_annotate_block
We need to execute field deserialization inside a closure in order to capture and annotate with the field name without having to put error annotation
src/generation.rs:4834
↓ 3 callers
Method
mark_and_extract_content
(self, target: &mut Self)
src/generation.rs:413
↓ 3 callers
Method
mark_used_as_key
(ty: &ConceptualRustType, used_as_key: &mut BTreeSet<RustIdent>)
src/intermediate.rs:726
↓ 3 callers
Function
materialize_at
( types: &IntermediateTypes, ty: &RustType, measure: i128, depth: u8, )
src/emit_tests.rs:1352
↓ 3 callers
Function
mint_struct
Mint a valid instance of a NAMED generated struct, recursing into its fields (depth-capped so recursion terminates: at the cap this returns `None`, wh
src/emit_tests.rs:1209
↓ 3 callers
Method
needs_bounds_check_if_inlined
(&self, types: &IntermediateTypes)
src/intermediate.rs:1641
↓ 3 callers
Function
noArg
(id: string, tag: string)
cddl-matrix/corpus_detect.ts:176
↓ 3 callers
Function
occur_kind
(o: &Occur)
examples/ast_roles.rs:75
↓ 3 callers
Function
ops_from_log
Read `<static_dir>/<log_name>`, apply the `cddl-lib` → `--lib-name` substitution (the same substring replacement the whole log text goes through, so `
src/cargo_manifest.rs:502
↓ 3 callers
Function
parse_group_type
Parses which type of group it is for various common special cases to handle
src/parsing.rs:1188
↓ 3 callers
Function
parse_type_choices
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, name: &RustIdent, type_choice
src/parsing.rs:223
↓ 3 callers
Function
probeEmissions
(id: string, example: string)
cddl-matrix/verify.ts:646
↓ 3 callers
Function
pushEmissionLines
(emission?: Record<string, EmissionOutcome>)
cddl-matrix/verify.ts:1387
↓ 3 callers
Function
reconcile
(dir: string, rows: Ex[], label: string)
cddl-matrix/project_robustness.ts:148
↓ 3 callers
Function
record_ctor_can_fail
Mirrors the record constructor's fallibility rule (`generation.rs` `new_can_fail`): `new()` returns `Result` iff any non-optional field is bounded.
src/emit_tests.rs:609
↓ 3 callers
Function
record_ctor_fields
The constructor field list (mirrors `codegen_struct`): mandatory, non-fixed, non-default.
src/emit_tests_wasm.rs:827
↓ 3 callers
Function
replayInDir
(outDir: string, vecs: ReplayVec[], decodeType: string)
cddl-matrix/verify.ts:849
↓ 3 callers
Function
roundtrip_body
The shared wire-cycle emission for a list of `(value_expr, label)` cases. `conf` is the source CDDL rule name for the `--emit-tests-conformance` oracl
src/emit_tests.rs:521
↓ 3 callers
Function
rust_scoped
`cddl_lib::`-scoped rust value expression (the independent twin for the byte differential). Mirrors `emit_tests::render_rust` but scope-qualifies ever
src/emit_tests_wasm.rs:162
↓ 3 callers
Function
rust_type_from_type2
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, type2: &Type2, cli: &Cli, )
src/parsing.rs:1616
↓ 3 callers
Function
sample_ops
A representative rust-ish changeset built by hand (no template/disk needed).
src/cargo_manifest.rs:624
↓ 3 callers
Method
serialize
(&self, serializer: S)
static/ordered_hash_map_json.rs:4
↓ 3 callers
Function
shortProbe
(id: string)
cddl-matrix/project_corpus.ts:234
↓ 3 callers
Function
splitlines
(t: string)
cddl-matrix/verify.ts:215
↓ 3 callers
Function
splitlines
(s: string)
cddl-matrix/query_q5_completeness.ts:52
↓ 3 callers
Function
stripComment
(s: string)
cddl-matrix/verify.ts:318
↓ 3 callers
Function
stripComment
(s: string)
cddl-matrix/query_q5_completeness.ts:92
↓ 3 callers
Function
sz_max
(sz: cbor_event::Sz)
tests/extern-dep-crate/src/serialization.rs:92
↓ 3 callers
Function
tag_literal
Extract the literal tag number cddl-codegen needs. The cddl AST models a tag as a `TagConstraint` (RFC 9682 allows type-valued `#6.<type>(...)` heads)
src/parsing.rs:216
↓ 3 callers
Function
toCamelCase
(ident: string)
cddl-matrix/verify.ts:736
↓ 3 callers
Method
to_canonical_cbor_bytes
(&self)
static/serialization_preserve_force_canonical.rs:57
↓ 3 callers
Function
validateBoth
(spec: string, hex: string)
cddl-matrix/verify.ts:891
↓ 3 callers
Function
version_stamp
The write-only version stamp: `package.metadata.cddl-codegen.generated-with = <tool version>`. The tool NEVER reads this back — reading would make out
src/cargo_manifest.rs:396
↓ 3 callers
Method
visit_types_excluding
( &self, types: &IntermediateTypes, f: &mut F, already_visited: &mut BTreeSet<
src/intermediate.rs:2295
↓ 3 callers
Function
wasm_choice_value
Build a choice variant through `new_<variant>` from a `Choice` mint value.
src/emit_tests_wasm.rs:342
↓ 3 callers
Method
wasm_lib
Scope header above the rest of the "lib" WASM scope. This is useful for when there is no explicit scope e.g. implicit types like arrays/tables (for WA
src/generation.rs:1687
↓ 3 callers
Method
wrap_in_block
dumps self.content into {block} then uses {block} as our new content
src/generation.rs:392
↓ 2 callers
Function
accept_assert
Boundary-acceptance assertion: the bounded wasm ctor accepts its exact boundary value.
src/emit_tests_wasm.rs:816
↓ 2 callers
Function
accept_cases
The ACCEPTED-boundary cases only (the host-safe half of `bound_cases`).
src/emit_tests_wasm.rs:803
↓ 2 callers
Function
addDef
(cur)
static/run-json2ts.js:37
↓ 2 callers
Function
add_wasm_enum_getters
( s_impl: &mut codegen::Impl, types: &IntermediateTypes<'_>, name: &RustIdent, variants: &[Enu
src/generation.rs:7114
↓ 2 callers
Method
after_str
(&self, is_result: bool)
src/generation.rs:469
↓ 2 callers
Function
anchor
(n: Note)
cddl-matrix/project_corpus.ts:235
↓ 2 callers
Function
append_raw_bytes_defs
Append the in-repo user-supplied `RawBytesEncoding` defs (`PubKey`) into a freshly generated crate rooted at `out` (rust + wasm), so a `rawbytes__*` w
src/tests/integration_tests.rs:476
↓ 2 callers
Function
astRoles
(args: string[], stdin?: string)
cddl-matrix/corpus_detect.ts:284
↓ 2 callers
Function
beInt
(from: number, to: number)
cddl-matrix/project_golden_hex.ts:96
↓ 2 callers
Function
bounded_scalar
Is `ty` a bounded SCALAR (integer / text / bytes) we can push past its boundary with a literal? Array/map length bounds need a wasm collection build (
src/emit_tests_wasm.rs:851
↓ 2 callers
Method
canonical_ordering
(&'a self)
src/intermediate.rs:3197
↓ 2 callers
Function
cborItems
(b: Uint8Array, label: string)
cddl-matrix/project_golden_hex.ts:92
↓ 2 callers
Method
cbor_encodings
CBOR encoding scope for `ident` (i.e. *Encoding structs)
src/generation.rs:1692
↓ 2 callers
Function
cbor_event_len_n
(n: &str, cli: &Cli)
src/generation.rs:7228
↓ 2 callers
Function
cbor_type_code_str
(cbor_type: cbor_event::Type)
src/utils.rs:3
↓ 2 callers
Method
cbor_types_inner
Gets the next CBOR type after the passed in rep (array/map) tag Returns None if this is not possible and brute-force deserialization trying every vari
src/intermediate.rs:2472
↓ 2 callers
Function
cddl_oracle_rooted
(spec: &str, root_rule: &str)
tests/deser_test_conformance.rs:40
↓ 2 callers
Function
cddl_paths
( output: &mut Vec<std::path::PathBuf>, cd: &std::path::PathBuf, )
src/api.rs:18
↓ 2 callers
Function
cellId
(b: number)
cddl-matrix/project_golden_hex.ts:57
↓ 2 callers
Function
choice_construct_reject
construct-reject for type/group choice variants whose constructor checks bounds.
src/emit_tests.rs:906
↓ 2 callers
Function
choice_roundtrip
Choice round-trip: one wire cycle per constructible variant (the construct-reject half never serializes, so this is the variants' first trip through t
src/emit_tests.rs:697
↓ 2 callers
Function
classify_sign_arm
Project a value window onto one CBOR sign arm. Distinguishes "vacuous in this arm" (drop the bound) from "this arm's whole sign domain is excluded" (u
src/generation.rs:4090
↓ 2 callers
Function
codegen_table_type
( gen_scope: &mut GenerationScope, types: &IntermediateTypes, name: &RustIdent, key_type: Rust
src/generation.rs:4884
↓ 2 callers
Function
coreOf
(evidence: string)
cddl-matrix/query_q4_directional.ts:196
↓ 2 callers
Function
crateHasDeserialize
(outDir: string, typeName: string)
cddl-matrix/verify.ts:833
↓ 2 callers
Function
create_base_rust_struct
( types: &IntermediateTypes<'_>, ident: &RustIdent, manual_json_impl: bool, cli: &Cli, )
src/generation.rs:4268
↓ 2 callers
Function
create_deserialize_impls
( ident: &RustIdent, rep: Option<Representation>, tag: Option<usize>, len_info: Option<RustStr
src/generation.rs:4745
↓ 2 callers
Function
create_serialize_impls
( ident: &RustIdent, rep: Option<Representation>, tag: Option<usize>, definite_len: &str,
src/generation.rs:4545
↓ 2 callers
Function
create_variants_from_type_choices
TODO: Also generates individual choices if required, ie for a / [foo] / c would generate Foos
src/parsing.rs:1072
↓ 2 callers
Function
declare_modules
( gen_scopes: &mut BTreeMap<ModuleScope, codegen::Scope>, module_scopes: &[ModuleScope], )
src/generation.rs:4157
↓ 2 callers
Function
decode_replay_generate
Generate a crate from `spec` into `out` (default flags unless `extra` adds e.g. `--preserve-encodings=true`), no `--wasm`, no `--emit-tests` — replay
src/tests/integration_tests.rs:4545
↓ 2 callers
Function
decode_replay_run
Append the `__foreign_decode_replay` module (one `#[test]` per vector) to the generated lib.rs and `cargo test` it under the shared scratch target, re
src/tests/integration_tests.rs:4573
↓ 2 callers
Method
default
()
src/generation.rs:501
↓ 2 callers
Method
definite_info
See comment in RustStruct::definite_info(), this is the same, returns a string expression which evaluates to the length. self_expr is an expression th
src/intermediate.rs:1512
↓ 2 callers
Function
dep_feature_names
The feature names of a dep spec (empty for a plain string or a spec with no `features` array).
src/cargo_manifest.rs:221
↓ 2 callers
Function
dep_version
The version field of a dep spec: the string itself for a plain-string shorthand (`"1.0"` is `{ version = "1.0" }`), else the `version` key of a table-
src/cargo_manifest.rs:210
↓ 2 callers
Function
deriveDecode
(id: string, evidence: string, roundTrip: string)
cddl-matrix/query_q4_directional.ts:163
↓ 2 callers
Function
deriveRoundTrip
(ev: string)
cddl-matrix/query_q4_directional.ts:147
↓ 2 callers
Function
emit_item
(out: &mut Vec<u8>, item: &Item, cfg: &Cfg)
static/emit_tests_encoding_fidelity.rs:209
↓ 2 callers
Function
empty_everything
Minimal everything decoded from hand-written outer CBOR structure: [foo, external_foo, [], {}, baz, qux]. Also the only profile-agnostic way to mint a
tests/multifile/tests.rs:60
← previous
next →
201–300 of 1,061, ranked by callers