cddl-codegen
                                
                                
                                
                                    cddl-codegen copied to clipboard
                            
                            
                            
                        Codegen serialization logic for CBOR automatically from a CDDL specification
``` third = (bytes, uint) third_arr = [third] tagged_third = #6.11(third) non_overlap_basic_not_basic = [ third // third_arr // tagged_third ] ``` It passes the args to `Third::new()` in directly to...
```cddl non_overlap_basic_embed_mixed = [ ; @name first x: uint, tag: 0 // ; @name second y: text, z: uint ] ```
```cddl basic = (text, uint) choice = [ ; @name foo basic // ; @name bar uint, basic ] ``` will generate `Self::Foo(Foo::new(...))` instead of `Self::Foo(Basic::new(...))` which won't compile as...
```cddl hash = bytes .size (0..8) non_overlap_basic_embed = [ ; @name identity tag: 0 // ; @name hash tag: 1, hash: bytes .size 32 ] ``` This should be fine...
We want to use cddl-codegen to generate some projects for constrained devices. So `no_std` would be really useful for this. Needs primetype/cbor_event#13
CDDL: ```cddl bool_wrapper = bool ; @newtype ``` Compile error: ``` 116 | Ok(Self(raw.bool().map_err(Into::into)?)) | ^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the trait `Into` ```
(low priorty) The path names generated for JSON objects use `::` (ex: `json-gen/schemas/cml_crypto::Ed25519KeyHash.json`) This works fine on Ubuntu, but for Windows colons are not allowed in filenames so this creates...
Previous handling of uppercase letters in `@name` generation was not ideal Notably, `@name NFT` would result in the generated rust code having functions like `new_n_f_t` instead of `new_nft` This PR...
``` foo = [ single: [uint] ] ``` is treated as: ``` foo = [ single: [* uint] ] ``` As per the CDDL RFC: >If no occurrence indicator is...
The [CDDL specification](https://datatracker.ietf.org/doc/rfc8610/) mentions `bigint` in the following section ``` biguint = #6.2(bstr) bignint = #6.3(bstr) bigint = biguint / bignint integer = int / bigint unsigned = uint /...