Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking implementations #29

Open
anweiss opened this issue Aug 12, 2019 · 16 comments
Open

Tracking implementations #29

anweiss opened this issue Aug 12, 2019 · 16 comments

Comments

@anweiss
Copy link

anweiss commented Aug 12, 2019

Given the RFC 8610 status of CDDL, it may be prudent to track active implementations. Not sure if it is best to list CDDL implementations at http://cbor.io/impls.html or somewhere else, but figured here would be a good first step.

Will also contribute my own attempt at implementing the spec in Rust as a start :)

Rust: https://github.com/anweiss/cddl (Crates.io) (as of 08/12/2019, partial implementation)
Ruby: https://rubygems.org/gems/cddl/

@cabo
Copy link
Contributor

cabo commented Aug 15, 2019

Hi Andrew,

yes, we should do that! Is there a command line usage for your fledgling tool?

@anweiss
Copy link
Author

anweiss commented Aug 19, 2019

@cabo sure thing. I've published CLI binaries for various platforms on the Releases page. Some instructions are in the README as well. Still a bit rough around the edges, so might get some odd errors. It's a start nonetheless.

@anweiss
Copy link
Author

anweiss commented Aug 22, 2019

And similar to cbor.me, I've published an in-browser CDDL conformance checking tool -> https://anweiss.github.io/cddl/. All built from the same Rust code base using WebAssembly. I'll reiterate that it's still rough around the edges, but it works!

@core-bot
Copy link

core-bot commented Aug 22, 2019 via email

@anweiss
Copy link
Author

anweiss commented Aug 22, 2019

Appreciate the feedback! Good catch! Parsing error on my part. Swap the + with * or some other occurrence indicator ... i..e. 2* ... and it should work. Will fix.

@anweiss
Copy link
Author

anweiss commented Aug 22, 2019

Fixed. Feel free to refresh and give it a whirl. May need to clear your browser cache to reflect the latest changes. Works on my end now.

Screen Shot 2019-08-22 at 7 34 28 PM

Feel free to keep hitting away on any edge cases you can think of. I'll be pushing up a JSON validation feature to this soon as well. Just need to finish going through the control operators and monomorphization of generics.

@hellp
Copy link

hellp commented Jan 16, 2020

A little off-topic, but maybe someone is interested here: I wrote a CDDL syntax definition for the Sublime Text editor. I think there is a Rust syntax highlighter that can use .sublime-syntax definitions.

It was really a weekend project for me, and my first real parser/lexer I wrote, so I didn't announce it anywhere yet. It's based on the RFC from March 2019 and pretty complete, IIRC.
https://github.com/hellp/sublime-cddl-syntax

And the same for Python's pygments highlighter, albeit a bit less tested: https://github.com/hellp/pygments-cddl-lexer/

@SebastienGllmt
Copy link

We wrote code that generates WASM-compatible Rust code for serialization based off a CDDL spec and open sourced it here https://github.com/Emurgo/cddl-codegen

It has some limitations but it still may be of interest to others. It's based on the wonderful work by @anweiss and he also helped us author this library.

@nomeata
Copy link

nomeata commented Apr 14, 2020

Not sure if this is the best place to report it, but https://rubygems.org/gems/cddl/ points to http://github.com/cabo/cddl which is 404.

@cabo
Copy link
Contributor

cabo commented Apr 14, 2020

Thanks @nomeata -- I need to fix this pointer. I originally planned to do the usual github thing with that code, but it turns out the code has grown so ugly over the half-decade we developed and evolved CDDL that I think looking at it is more detrimental than useful. If you really want to look at the code, please consider the warning and then extract it from the gem, in which of course you find a copy.

@nomeata
Copy link

nomeata commented Apr 14, 2020

My reason to look was to see if there was a issue to track implementation of generics (although I notice that I am on 0.8.9, so maybe I should upgrade first)

@anweiss
Copy link
Author

anweiss commented Apr 22, 2020

FWIW, I've been developing a language server implementation and extension for VSCode. Quick demo here. If anyone is interested in giving it a whirl before I push it to the Marketplace, I'm happy to share the .vsix. Still a bit rough around the edges but it's something. It leverages the same Rust library I've been maintaining, but compiled for wasm.

@anweiss
Copy link
Author

anweiss commented May 7, 2020

As a follow up, I've published a Preview version of the CDDL extension for VSCode to the Marketplace -> https://marketplace.visualstudio.com/items?itemName=anweiss.cddl-languageserver. For anyone that's interested, feel free to give it a whirl and report any bugs at https://github.com/anweiss/cddl/issues. Cheers!

@anweiss
Copy link
Author

anweiss commented Nov 2, 2020

hey @cabo any updates here?

@christian-bromann
Copy link

@anweiss thank you for your work on the Rust implementation, it inspired me to learn about parsers and build a cddl one in TypeScript

NPM: https://www.npmjs.com/package/cddl
GitHub: https://github.com/saucelabs/cddl

@anweiss
Copy link
Author

anweiss commented Nov 17, 2020

Right on @christian-bromann! This is awesome to see!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants