Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hanneskimara/cddlc
WIP: Parser and Code Generator for the Concise Data Definition Language (CDDL)
https://github.com/hanneskimara/cddlc
cbor cddl codegen golang parser rfc8610 validation
Last synced: 2 months ago
JSON representation
WIP: Parser and Code Generator for the Concise Data Definition Language (CDDL)
- Host: GitHub
- URL: https://github.com/hanneskimara/cddlc
- Owner: HannesKimara
- License: apache-2.0
- Created: 2022-11-18T15:28:48.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-29T23:25:07.000Z (about 1 year ago)
- Last Synced: 2024-10-08T02:02:39.586Z (3 months ago)
- Topics: cbor, cddl, codegen, golang, parser, rfc8610, validation
- Language: Go
- Homepage: https://cddlc.github.io/docs/
- Size: 209 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CDDL
[![Build status](https://github.com/HannesKimara/cddlc/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/HannesKimara/cddlc/actions/workflows/go.yml)
[![GoDoc](https://pkg.go.dev/badge/github.com/HannesKimara/cddlc?utm_source=godoc)](https://pkg.go.dev/github.com/HannesKimara/cddlc)Golang implementation for Concise Data Definition Language (CDDL). CDDL is an [IETF standard](https://www.rfc-editor.org/rfc/rfc8610) whose main goal is to provide an easy and unambiguous way to express structures for protocol messages and data formats that use CBOR or JSON.
> **Warning**
This repository is still in active development and may introduce breaking changes. Do not use in production## Installation
### Go library``` sh
go get -u github.com/HannesKimara/cddlc
```### cddlc tool
```sh
go install github.com/HannesKimara/cddlc/cmd/cddlc@latest
```## Getting Started
![cddlc demo](./docs/static/cddlc-demo.gif)
To get started using the parser library visit the [docs](https://pkg.go.dev/github.com/HannesKimara/cddlc)
## Supported features
| CDDL | Parser | Code Generator |
|------|--------|----------------|
| identifiers
(`basic`, `hyphen-separated`, *`weird..ones` ...) | ☑ | ☑* |
| primitives
(`bool`, `false`, `true`, `tstr`, `text`, `"text_literal"`, `float`, `float16`, `float32`, `float64`, `uint`, `int`, `nint`, `bstr`, `bytes`, `null/nil`) | ☑ | ☑ |
| occurrence operators
(`*`, `+`, `?`) | ☑ | ☐ |
| choice operators
(`/`, `//`) | ☑ | ☐ |
| composition operators
(`~`) | ☑ | ☐ |
| comparable control operators
(`.lt`, `.le`, `.gt`, `.ge`, `.eq`, `.ne`) | ☑ | ☐ |
| constraint control operators
(`.size`, `.regexp`) | ☑ | ☐ |
| collections
(`groups ()`, `arrays []`, `structs {}`) | ☑ | ☐ |> **Note**
`*` means that the cddl construct may not be fully supported in a particular context such as identifer translation during code generation.## License
This project is licensed under the Apache-2.0 license. Please see the [LICENSE](LICENSE) file for more details.