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
↓ 472 callers
Method
push
(mut self, gen_scope: &mut GenerationScope, types: &IntermediateTypes)
src/generation.rs:4330
↓ 371 callers
Method
line
(&mut self, line: &str)
src/generation.rs:4221
↓ 106 callers
Method
push_block
(&mut self, block: Block)
src/generation.rs:4225
↓ 88 callers
Function
deser_test
(orig: &T)
tests/core/tests.rs:15
↓ 86 callers
Method
as_ref
(&self)
src/intermediate.rs:1254
↓ 86 callers
Function
o
(s = "")
cddl-matrix/project_corpus.ts:281
↓ 69 callers
Method
to_cbor_bytes
(&self)
tests/extern-dep-crate/src/lib.rs:31
↓ 58 callers
Function
w
(s = "")
cddl-matrix/project_golden_hex.ts:248
↓ 43 callers
Function
w
(s = "")
cddl-matrix/project_corpus.ts:196
↓ 37 callers
Function
tool_cmd
Spawn cargo/wasm-pack for building a *generated* crate. The generated code is the harness's own output and legitimately over-imports; CI's `setup-rust
src/tests/integration_tests.rs:108
↓ 36 callers
Method
is_fixed_value
(&self)
src/intermediate.rs:1792
↓ 36 callers
Method
rec
(&mut self, kind: &str, name: Option<String>)
examples/ast_roles.rs:49
↓ 34 callers
Function
featuresIn
(cddl: string)
cddl-matrix/corpus_detect.ts:217
↓ 33 callers
Function
run
(spec: &str, tag: &str)
src/tests/robustness_tests.rs:339
↓ 31 callers
Method
as_bytes
(mut self)
src/intermediate.rs:1414
↓ 30 callers
Method
resolve_alias_shallow
shallow resolve aliases. use this when you only need to strip direct aliases to check the type more easily e.g. to figure out if a ConceptualRustType
src/intermediate.rs:1720
↓ 24 callers
Function
canonical
()
src/tests/integration_tests.rs:3566
↓ 24 callers
Method
variant
(&self)
src/intermediate.rs:2887
↓ 22 callers
Function
apply
Apply `ops` in order to `existing` (parsed if `Some`, else a fresh empty document) and serialize the result. Pure: no disk I/O, output is a function o
src/cargo_manifest.rs:84
↓ 22 callers
Method
directly_wasm_exposable
(&self, types: &IntermediateTypes)
src/intermediate.rs:1727
↓ 22 callers
Method
rust_struct
(&self, ident: &RustIdent)
src/intermediate.rs:546
↓ 22 callers
Method
rust_type
Can only be used on RustType variants, panics otherwise. So don't call this when we're embedding the variant types
src/intermediate.rs:2554
↓ 21 callers
Function
encoding_fields
( types: &IntermediateTypes, name: &str, ty: &RustType, include_default: bool, cli: &Cli,
src/generation.rs:5145
↓ 21 callers
Function
generated_strings
( cli: &Cli, )
src/api.rs:247
↓ 21 callers
Function
run_test
( dir: &str, options: &[&str], export_suffix: Option<&str>, external_rust_file_paths: &[std::p
src/tests/integration_tests.rs:501
↓ 20 callers
Method
derive
(&mut self, derive: &str)
src/generation.rs:4257
↓ 18 callers
Function
deser_test
(orig: &T)
tests/preserve-encodings/tests.rs:7
↓ 18 callers
Method
generate_deserialize
( &mut self, types: &IntermediateTypes, serializing_rust_type: SerializingRustType,
src/generation.rs:2371
↓ 18 callers
Function
generate_to_disk
Run the full pipeline and write the generated crate(s) to `cli.output` (the CLI behaviour).
src/api.rs:230
↓ 17 callers
Method
name_as_var
(&self)
src/intermediate.rs:2563
↓ 17 callers
Method
push_all
(&mut self, contents: BlocksOrLines)
src/generation.rs:4206
↓ 17 callers
Method
resolve_aliases
deep resolve aliases
src/intermediate.rs:1420
↓ 17 callers
Function
tool_exists
(bin: &str)
src/tests/integration_tests.rs:95
↓ 16 callers
Method
is_plain_group
(&self, name: &RustIdent)
src/intermediate.rs:833
↓ 16 callers
Method
register_rust_struct
this is called by register_table_type / register_array_type automatically
src/intermediate.rs:575
↓ 15 callers
Method
add_to_code
(self, target: &mut Self)
src/generation.rs:381
↓ 15 callers
Function
deser_test
(orig: &T)
tests/rust-wasm-split/tests.rs:7
↓ 15 callers
Function
render_rust
Render a `MintValue` as the rust-crate API expression string. This reproduces, byte-for-byte, the output the fused derive-and-format code produced bef
src/emit_tests.rs:155
↓ 13 callers
Method
expr_is_ref
(mut self, is_ref: bool)
src/generation.rs:72
↓ 13 callers
Method
for_rust_member
Type when storing a value inside of a rust struct. This is the underlying raw representation.
src/intermediate.rs:1956
↓ 13 callers
Method
for_wasm_param
Function parameter TYPE from wasm (i.e. ref for non-primitives, value for supported primitives)
src/intermediate.rs:1854
↓ 13 callers
Method
register_type_alias
(&mut self, alias: RustIdent, info: AliasInfo)
src/intermediate.rs:536
↓ 13 callers
Method
rust_structs
(&self)
src/intermediate.rs:239
↓ 12 callers
Function
foreignTomlStr
(s: string)
cddl-matrix/verify.ts:729
↓ 12 callers
Method
optional_field
(mut self, is_optional: bool)
src/generation.rs:212
↓ 12 callers
Method
record_rejection
Record a construct the parse walk rejects by design (it can't return an `Err` itself). `finalize` turns any accumulated rejections into a single grace
src/intermediate.rs:190
↓ 12 callers
Method
tag
(mut self, tag: usize)
src/intermediate.rs:1378
↓ 12 callers
Method
tag_if
(self, tag: Option<usize>)
src/intermediate.rs:1383
↓ 11 callers
Function
bounds_check_if_block
( bounds: &(Option<i128>, Option<i128>), e: &str, return_err: bool, )
src/generation.rs:4042
↓ 11 callers
Method
custom_deserialize
(mut self, func: String)
src/generation.rs:231
↓ 11 callers
Method
is_end
(mut self, is_end: bool)
src/generation.rs:78
↓ 11 callers
Function
tomlStr
(s: string)
cddl-matrix/verify.ts:1322
↓ 11 callers
Function
write_using_sz
( body: &mut dyn CodeBlock, func: &str, serializer_use: &str, expr: &str, fit_sz_expr: &st
src/generation.rs:3923
↓ 10 callers
Method
add_to
(self, body: &mut T)
src/generation.rs:374
↓ 10 callers
Function
check
(obj, label)
tests/wasm_json/roundtrip.mjs:18
↓ 10 callers
Function
dep
A `[dependencies]` entry emitted set-or-remove: `Set(spec)` when `enabled`, else `Remove`.
src/cargo_manifest.rs:384
↓ 10 callers
Function
deser_test
(orig: &T)
tests/comment-dsl/tests.rs:11
↓ 10 callers
Method
export
Exports all already-generated state to the provided directory. Call generate() first to populate the generation state.
src/generation.rs:1256
↓ 10 callers
Function
fold_log
Read an append-only change log (already lib-name-substituted) and fold it into ordered ops. Each `[[change]]` has an `id` (must be contiguous from 1),
src/cargo_manifest.rs:416
↓ 10 callers
Method
in_embedded
(mut self, in_embedded: bool)
src/generation.rs:207
↓ 10 callers
Method
is_enum
mostly for convenience since this is checked in so many places
src/intermediate.rs:564
↓ 10 callers
Function
merged_dep
Apply a single `dependencies.<name>` Set to `existing` and return the merged entry's rendered line (`name = ...`), for tight assertions on the merge o
src/cargo_manifest.rs:800
↓ 10 callers
Function
runExit
(cmd: string[], cwd?: string, env?: Record<string, string>, timeoutS = PROBE_TIMEOUT)
cddl-matrix/verify.ts:427
↓ 10 callers
Function
runProbe
(cmd: string[], cwd?: string, env?: Record<string, string>, timeoutS = PROBE_TIMEOUT)
cddl-matrix/verify.ts:442
↓ 10 callers
Method
rust_lib
Scope header above the rest of the "lib" rust scope. This is useful for when there is no explicit scope e.g. implicit types like arrays/tables (for WA
src/generation.rs:1657
↓ 10 callers
Function
rustfmt_generated_string
Runs rustfmt on the string
src/generation.rs:9470
↓ 10 callers
Method
scope
(&self, ident: &RustIdent)
src/intermediate.rs:856
↓ 10 callers
Function
valid_value
A valid in-range minted value for `ty`, or `None` if it can't be cheaply minted.
src/emit_tests.rs:1129
↓ 10 callers
Method
wasm
Generates in the appropriate scope for `ident` Used for all the generated WASM wrapper structs and associated traits
src/generation.rs:1679
↓ 9 callers
Method
cbor_types
All POSSIBLE outermost CBOR types this can encode to
src/intermediate.rs:1115
↓ 9 callers
Method
config
(&self)
src/intermediate.rs:2883
↓ 9 callers
Method
encoding_var_is_ref
(mut self, is_ref: bool)
src/generation.rs:83
↓ 9 callers
Method
for_wasm_return
Return TYPE for wasm
src/intermediate.rs:1906
↓ 9 callers
Method
is_copy
if it impements the Copy trait in rust
src/intermediate.rs:2232
↓ 9 callers
Method
rust
Generates in the appropriate scope for `ident` Used for all the generated structs and associated traits (besides serialization ones)
src/generation.rs:1649
↓ 9 callers
Function
rust_type_from_type1
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, type1: &Type1, cli: &Cli, )
src/parsing.rs:1578
↓ 9 callers
Method
source_rule_name
The exact CDDL source rule name `ident` was registered under (e.g. `my-rule`, which `RustIdent` camel-cases to `MyRule`, indistinguishable from `my_ru
src/intermediate.rs:870
↓ 8 callers
Function
deser_test
(orig: &T)
tests/multifile/tests.rs:21
↓ 8 callers
Function
encoding_var_names_str
( types: &IntermediateTypes, field_name: &str, rust_type: &RustType, cli: &Cli, )
src/generation.rs:5399
↓ 8 callers
Method
expanded_field_count
CBOR len count for the entire type if it were embedded as a member in a cbor collection (array/map)
src/intermediate.rs:1482
↓ 8 callers
Function
match
(s: string)
cddl-matrix/query_q5_completeness.ts:229
↓ 8 callers
Function
measure_kind
How `ty`'s bound is measured, or `None` if it isn't a cheaply-testable bounded shape (`nint`/bool/float values are excluded — see module docs).
src/emit_tests.rs:1019
↓ 8 callers
Function
merge_metadata
(r1: &RuleMetadata, r2: &RuleMetadata)
src/comment_ast.rs:37
↓ 8 callers
Method
new_type
note: this is mut so that apply_type_aliases() can mark which reserved idents are in the CDDL prelude so we don't generate code for all of them, poten
src/intermediate.rs:460
↓ 8 callers
Function
ok
(exit: number)
cddl-matrix/verify.ts:1321
↓ 8 callers
Function
pin
(reason: string)
cddl-matrix/verify.ts:930
↓ 8 callers
Function
type2_is_null
would use rust_type_from_type1 but that requires IntermediateTypes which we shouldn't
src/parsing.rs:1346
↓ 8 callers
Function
type2_to_number_literal
(type2: &Type2)
src/parsing.rs:303
↓ 7 callers
Function
die
(msg: string)
cddl-matrix/project_golden_hex.ts:94
↓ 7 callers
Method
generate_serialize
( &mut self, types: &IntermediateTypes, serializing_rust_type: SerializingRustType<'_>
src/generation.rs:1703
↓ 7 callers
Function
make_foo
(index_0: u64)
tests/multifile/tests.rs:31
↓ 7 callers
Function
metadata_from_comments
(comments: &[&str])
src/comment_ast.rs:232
↓ 7 callers
Function
range_to_primitive
(low: Option<i128>, high: Option<i128>, primitive: Primitive)
src/parsing.rs:514
↓ 7 callers
Method
type_aliases
(&self)
src/intermediate.rs:235
↓ 7 callers
Function
valid_value_at
(types: &IntermediateTypes, ty: &RustType, depth: u8)
src/emit_tests.rs:1133
↓ 7 callers
Function
variant_arg_fields
The constructor arg list of a choice variant's `new_<variant>` (mirrors `generate_enum`), or `None` when it isn't cheaply constructible (inlined recor
src/emit_tests.rs:1448
↓ 7 callers
Function
write_string_sz
( body: &mut dyn CodeBlock, func: &str, serializer_use: &str, expr: &str, expr_is_ref: boo
src/generation.rs:3950
↓ 6 callers
Method
annotate
This MUST have self.content be a Result, as if you were going to wrap it in an error annotation lambda block. If possible this will avoid the need for
src/generation.rs:401
↓ 6 callers
Method
as_single_line
(&self)
src/generation.rs:4184
↓ 6 callers
Function
cbor_round_trip
(orig: &T)
tests/nullable-wasm/tests.rs:13
next →
1–100 of 1,061, ranked by callers