#cddl #converter #parser #command-line-tool #arguments-parser

bin+lib cddlconv

A commandline utility for converting CDDL to various formats

6 releases

new 0.1.6 Mar 14, 2025
0.1.5 Mar 7, 2024
0.1.3 Jan 26, 2024
0.1.2 Nov 10, 2023
0.1.1 Aug 28, 2023

#548 in Parser implementations

Download history 20/week @ 2024-11-24 41/week @ 2024-12-01 19/week @ 2024-12-08 19/week @ 2024-12-15 1/week @ 2024-12-22 14/week @ 2025-01-05 17/week @ 2025-01-12 14/week @ 2025-01-19 10/week @ 2025-02-02 7/week @ 2025-02-09 7/week @ 2025-02-16 5/week @ 2025-02-23 31/week @ 2025-03-02 78/week @ 2025-03-09

121 downloads per month

Apache-2.0

140KB
4.5K SLoC

TypeScript 2.5K SLoC // 0.0% comments Rust 1.5K SLoC // 0.0% comments

cddlconv

crates.io license ci

A commandline utility for converting CDDL to various formats.

Usage

  1. Clone this repo and cd into it.
  2. cargo run -- path/to/file.cddl

Tips

Formatting output

The output is generally ugly, so you may need to format it. The easiest way is to pipe it into a formatter.

For example,

outfile=path/to/file.ts
cargo run -- path/to/file.cddl | prettier --stdin-filepath=$outfile > $outfile

Limitations

  1. Only TypeScript and Zod is supported at the moment.

Dependencies

~12–21MB
~289K SLoC