reproto
reproto copied to clipboard
Language Support: Dart
Preliminary support for Dart has been pushed to genco: https://github.com/udoprog/genco#language-support
Initial implementation could generate fromJson
/toJson
implementations for each type.
If you are interested in contributing towards supporting dart, please feel free to add a note in this issue.
Work in Progress
Reproto Branch: https://github.com/reproto/reproto/tree/dart - this is currently mostly a copy of the rust backend. ~GenCo Branch: https://github.com/udoprog/genco/tree/dart~ Dart support now in a released version of GenCo.
TODO
- [x] JSON support that passes the existing test suite. (PR: #62)
- [x]
enum
support. - [x]
type
support.- Partial, the big missing piece is iterating over lists and maps and encode/decode the values.
- [x]
tuple
support. - [x]
interface
support.- A number of big things have been solved when working on
type
support. But still some ways to go.
- A number of big things have been solved when working on
- [x]
- [x] Backend-specific documentation for Language Support.
- [x] Running project integration tests. Done, since we now have a workdir.
Some notes on how the process of building a new backend works:
Install the Dart SDK from: https://www.dartlang.org/tools/sdk/archive
Note: You need to have the dart
command in your PATH.
Make the appropriate changes to the backend.
Try to compile the backend with cargo build
.
Update test suite with make update-suites FILTER=dart
.
This will populate all the integration tests in the ./it
folder using the backend, you can look at these files to see if they make sense.
You can do a quick test, and see if a file compiles with dart path/to/file.dart