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
↓ 6 callers
Function
cli_for
Build a `Cli` for in-process generation. `--output` is unused (`generated_strings` does no disk I/O) but clap requires it; `--static-dir` defaults to
src/tests/snapshot_tests.rs:38
↓ 6 callers
Function
combine_comments
(a: &'a Option<Comments>, b: &'a Option<Comments>)
src/parsing.rs:1410
↓ 6 callers
Function
emit_head
Emit a head for `major` carrying `arg`, at the width `w` selects (minimal, one step wider, or straight to 8-byte; a head already at 8 bytes is left al
static/emit_tests_encoding_fidelity.rs:153
↓ 6 callers
Function
end_len
( body: &mut dyn CodeBlock, serializer_use: &str, encoding_var: &str, is_end: bool, cli: &
src/generation.rs:3902
↓ 6 callers
Method
expr
(mut self, expr: S)
src/generation.rs:62
↓ 6 callers
Method
finalize
call this after all types have been registered
src/intermediate.rs:680
↓ 6 callers
Method
generate_constructor
if init_fields exists, use these for values, otherwise assumes variables exist with same names
src/generation.rs:7431
↓ 6 callers
Function
get_comment_after
Gets the comment(s) that come after a type by parsing the CDDL AST (implementation detail) sometimes getting the comment after a type requires walkin
src/parsing.rs:2500
↓ 6 callers
Function
loadTomlArray
(rel: string, key: string)
cddl-matrix/lib.ts:38
↓ 6 callers
Function
log
(note: string)
cddl-matrix/verify.ts:615
↓ 6 callers
Function
make_deserialization_function
(name: &str, reader: &str, cli: &Cli)
src/generation.rs:8532
↓ 6 callers
Function
minicbor_next_item
(it: &mut minicbor::decode::Tokenizer<'_, '_>)
src/tests/integration_tests.rs:248
↓ 6 callers
Method
name_as_wasm_array
(&self, types: &IntermediateTypes)
src/intermediate.rs:1800
↓ 6 callers
Function
re_encode
(input: &[u8], cfg: Cfg)
static/emit_tests_encoding_fidelity.rs:277
↓ 6 callers
Method
rust_serialize
Serialization scope for `ident`
src/generation.rs:1662
↓ 6 callers
Function
rust_type
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, t: &Type, cli: &Cli, )
src/parsing.rs:1777
↓ 6 callers
Method
set_rep_if_plain_group
see self.plain_groups comments
src/intermediate.rs:787
↓ 6 callers
Function
sz_max
(sz: cbor_event::Sz)
static/serialization_preserve.rs:70
↓ 6 callers
Function
type_uses_custom_ser
( types: &IntermediateTypes, ty: &RustType, visited: &mut std::collections::BTreeSet<RustIdent>, )
src/emit_tests.rs:447
↓ 6 callers
Method
used_as_key
(&self, name: &RustIdent)
src/intermediate.rs:892
↓ 6 callers
Function
wasm_arg
A single wasm ctor argument: the value expression prefixed with `&` when the wasm param is a ref (composite wrappers / wrapper collections), matching
src/emit_tests_wasm.rs:377
↓ 6 callers
Method
with_bounds
(self, mut bounds: (Option<i128>, Option<i128>))
src/intermediate.rs:1428
↓ 6 callers
Function
with_thread_silenced_panics
Silence panic output from THIS test's thread for the duration of `f` (the deliberate `catch_unwind` probes would otherwise spew every expected panic).
src/tests/robustness_tests.rs:32
↓ 5 callers
Function
acquire_scratch_lock
(scratch_name: &str)
src/tests/integration_tests.rs:34
↓ 5 callers
Function
axisOf
(id: string)
cddl-matrix/query_q1_gaps.ts:67
↓ 5 callers
Function
bounds_check_expr_rust_type
pub(crate): emit_tests mirrors ctor fallibility as `needs_bounds_check_if_inlined && this is Some`
src/generation.rs:4000
↓ 5 callers
Method
cbor_len_info
(&self, types: &IntermediateTypes)
src/intermediate.rs:2976
↓ 5 callers
Function
cml_shaped_manifest
A user manifest shaped like cardano-multiplatform-lib's `[dependencies]` block — the deps whose user-shaped specs a whole-value `Set` used to flatten.
src/cargo_manifest.rs:787
↓ 5 callers
Function
convert_to_camel_case
(ident: &str)
src/utils.rs:58
↓ 5 callers
Function
count
(p: string)
cddl-matrix/query_q6_diff.ts:158
↓ 5 callers
Function
create_base_wasm_wrapper
default_structure will have it be a DIRECT wrapper with a tuple field of rust_lib::{ident} this will include generating to/from traits automatically
src/generation.rs:4489
↓ 5 callers
Method
for_rust_move
Function parameter TYPE that will be moved in
src/intermediate.rs:1818
↓ 5 callers
Function
key_encoding_field
(name: &str, key: &FixedValue)
src/generation.rs:5121
↓ 5 callers
Function
key_path
(segments: &[&str])
src/cargo_manifest.rs:379
↓ 5 callers
Function
loadMatrix
(path: string)
cddl-matrix/query_q6_diff.ts:46
↓ 5 callers
Function
log
Assemble a change log from `(path, action)` pairs, numbering ids contiguously from 1.
src/cargo_manifest.rs:976
↓ 5 callers
Function
make_serialization_function
(name: &str, writer: &str, cli: &Cli)
src/generation.rs:8510
↓ 5 callers
Function
materialize
Build a minted value for `ty` whose bound-relevant measure equals `measure` (the value itself for integers, the length for text/bytes/array/map).
src/emit_tests.rs:1344
↓ 5 callers
Function
minicbor_pull
( it: &mut minicbor::decode::Tokenizer<'_, 'b>, )
src/tests/integration_tests.rs:238
↓ 5 callers
Function
nint_bounds_to_u64
we store nint as its u64 magnitude `m = |v + 1| = -v - 1`, which is *decreasing* in the signed value `v`. So a value bound `vmin <= v <= vmax` maps to
src/generation.rs:4021
↓ 5 callers
Function
parse_control_operator
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, type2: &Type2, operator: &Ope
src/parsing.rs:336
↓ 5 callers
Method
resolve
TODO: should we rename fields / variant names after-the-fact? (for the cases where the name came from the original generic param) returns None when it
src/intermediate.rs:3270
↓ 5 callers
Function
run
(profile: &str, extra_flags: &[&str])
src/tests/integration_tests.rs:1872
↓ 5 callers
Function
rust_crate_struct_from_wasm
Formatted string for fully scoped rust crate struct for use from wasm crate
src/generation.rs:4289
↓ 5 callers
Function
sh
(cmd: string[], cwd = ROOT, env?: Record<string, string>)
check.ts:68
↓ 5 callers
Function
start_len
( body: &mut dyn CodeBlock, rep: Representation, serializer_use: &str, encoding_var: &str,
src/generation.rs:3874
↓ 5 callers
Function
surround_in_len_checks
( mut main_deser_code: DeserializationCode, len_info: RustStructCBORLen, rep: Representation,
src/generation.rs:7597
↓ 5 callers
Method
to_wasm_boundary
FROM rust TO wasm (with cloning/wrapping) (for arguments)
src/intermediate.rs:2153
↓ 5 callers
Method
var_name
(mut self, var_name: S)
src/generation.rs:67
↓ 5 callers
Method
visit_type2
(&mut self, t2: &'b Type2<'a>)
examples/ast_roles.rs:133
↓ 5 callers
Method
visit_types
(&self, f: &mut F)
src/intermediate.rs:763
↓ 5 callers
Function
with_types
Parse the CDDL input described by `cli`, build the intermediate representation, and invoke `f` with a borrow of it plus the `export_raw_bytes_encoding
src/api.rs:45
↓ 5 callers
Function
ws
(s: string)
cddl-matrix/corpus_detect.ts:169
↓ 4 callers
Function
add_struct_derives
( data_type: &mut T, used_in_key: bool, is_enum: bool, custom_json: bool, cli: &Cli, )
src/generation.rs:9133
↓ 4 callers
Method
annotate
(self, location: T)
tests/extern-dep-crate/src/error.rs:66
↓ 4 callers
Function
arg_can_fail
Mirrors a choice-variant ctor's per-arg fallibility (`generation.rs` per-variant `can_fail`): an arg makes `new_<variant>` return `Result` only when i
src/emit_tests.rs:792
↓ 4 callers
Function
bound_cases
Boundary and just-beyond cases for a bounded type: `(value_expr, accept, label)`. Accept cases are the inclusive min/max boundaries (must round-trip /
src/emit_tests.rs:1094
↓ 4 callers
Method
can_new_fail
(&self, name: &RustIdent)
src/intermediate.rs:841
↓ 4 callers
Function
canon_f64_bits
(f: f64)
src/tests/integration_tests.rs:175
↓ 4 callers
Function
codegenVerdict
(p: CodegenProbe)
cddl-matrix/verify.ts:551
↓ 4 callers
Method
components
(&self)
src/intermediate.rs:41
↓ 4 callers
Method
container_encoding_lookup
for looking up encoding vars stored within a Vec<T> / Map<K, V> and declaring them as local variables
src/generation.rs:124
↓ 4 callers
Function
convert_to_snake_case
(ident: &str)
src/utils.rs:16
↓ 4 callers
Function
deser_test_canonical
(orig: &T)
tests/canonical/tests.rs:17
↓ 4 callers
Function
deser_test_orig
(orig: &T)
tests/canonical/tests.rs:7
↓ 4 callers
Method
encoding_var
(&self, child: Option<&str>, is_copy: bool)
src/generation.rs:108
↓ 4 callers
Method
encoding_var_in_option_struct
(mut self, option_struct: S)
src/generation.rs:88
↓ 4 callers
Method
encoding_var_no_option_struct
(mut self)
src/generation.rs:93
↓ 4 callers
Method
export_static_files
If someone override the common imports, we don't want to export them
src/cli.rs:134
↓ 4 callers
Function
find_refs_generic_args
( refs: &mut Vec<&'a Identifier<'a>>, generic_arg: &'a Option<GenericArgs<'a>>, )
src/dep_graph.rs:147
↓ 4 callers
Function
find_refs_group
(refs: &mut Vec<&'a Identifier<'a>>, group: &'a Group<'a>)
src/dep_graph.rs:120
↓ 4 callers
Function
find_refs_type1
(refs: &mut Vec<&'a Identifier<'a>>, type1: &'a Type1<'a>)
src/dep_graph.rs:79
↓ 4 callers
Method
for_variant
(&self)
src/intermediate.rs:982
↓ 4 callers
Function
foreignGenCrate
(outDir: string, spec: string)
cddl-matrix/verify.ts:825
↓ 4 callers
Function
foreignIdent
(id: string)
cddl-matrix/verify.ts:731
↓ 4 callers
Method
from
(failure: DeserializeFailure)
static/error.rs:143
↓ 4 callers
Method
from_wasm_boundary_clone
( &self, types: &IntermediateTypes, expr: &str, can_fail: bool, )
src/intermediate.rs:2019
↓ 4 callers
Function
inlineExample
(ex: string | undefined)
cddl-matrix/query_q1_gaps.ts:79
↓ 4 callers
Function
json_str
(s: &str)
examples/ast_roles.rs:365
↓ 4 callers
Function
make_deser_loop
(len_var: &str, len_expr: &str, cli: &Cli)
src/generation.rs:4842
↓ 4 callers
Function
make_serialization_impl
(name: &str, cli: &Cli)
src/generation.rs:8522
↓ 4 callers
Function
markerCount
(doc: string, marker: string)
cddl-matrix/query_q1_gaps.ts:242
↓ 4 callers
Function
match
(id: string)
cddl-matrix/query_q1_gaps.ts:319
↓ 4 callers
Function
parse_group
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, group: &Group, name: &RustIde
src/parsing.rs:2254
↓ 4 callers
Function
reEsc
(s: string)
cddl-matrix/corpus_detect.ts:45
↓ 4 callers
Method
to_embedded_rust_type
(&self)
src/intermediate.rs:2643
↓ 4 callers
Function
val
Infallible [`try_val`] for in-code op builders whose snippets are compile-time constants.
src/cargo_manifest.rs:375
↓ 4 callers
Function
valid_measure
In-range measure for a valid baseline: the inclusive min (or max, or 0).
src/emit_tests.rs:1040
↓ 4 callers
Method
visit_group
(&mut self, g: &'b Group<'a>)
examples/ast_roles.rs:340
↓ 4 callers
Method
visit_type
(&mut self, t: &'b Type<'a>)
examples/ast_roles.rs:111
↓ 3 callers
Method
add_conversion_methods
native_name is &str since we need to possibly prepend namespacing and where we're calling it we'd have to construct a RustType where we didn't have to
src/generation.rs:4357
↓ 3 callers
Function
add_deserialize_final_len_check
Adds final Len check if not fixed + reads for the ending Special::Break for Indefinite arrays
src/generation.rs:4682
↓ 3 callers
Function
add_deserialize_initial_len_check
Adds a fixed length check if length is fixed, reads the mandatory amount if there are optional fields, or nothing for dynamic lengths
src/generation.rs:4644
↓ 3 callers
Function
append_number_if_duplicate
(used_names: &mut BTreeMap<String, u32>, name: String)
src/utils.rs:191
↓ 3 callers
Function
argRequired
(id: string, tag: string)
cddl-matrix/corpus_detect.ts:170
↓ 3 callers
Function
cleanOut
()
cddl-matrix/verify.ts:479
↓ 3 callers
Function
collectDivergences
(id: string, emission?: Record<string, EmissionOutcome>)
cddl-matrix/verify.ts:1481
↓ 3 callers
Function
collectForeignFailure
(id: string, af?: boolean, fv?: number)
cddl-matrix/verify.ts:1509
↓ 3 callers
Function
countAxis
(rows: Annotation[], axis: Axis)
cddl-matrix/query_q1_gaps.ts:156
↓ 3 callers
Function
create_base_wasm_struct
( gen_scope: &GenerationScope, ident: &'a RustIdent, exists_in_rust: bool, cli: &Cli, )
src/generation.rs:4395
← previous
next →
101–200 of 1,061, ranked by callers