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

Language Support: Dart #61

Open
7 tasks done
udoprog opened this issue Oct 10, 2018 · 1 comment
Open
7 tasks done

Language Support: Dart #61

udoprog opened this issue Oct 10, 2018 · 1 comment

Comments

@udoprog
Copy link
Member

udoprog commented Oct 10, 2018

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

  • JSON support that passes the existing test suite. (PR: Initial support for JSON and Dart #62)
    • enum support.
    • type support.
      • Partial, the big missing piece is iterating over lists and maps and encode/decode the values.
    • tuple support.
    • interface support.
      • A number of big things have been solved when working on type support. But still some ways to go.
  • Backend-specific documentation for Language Support.
  • Running project integration tests. Done, since we now have a workdir.
@udoprog
Copy link
Member Author

udoprog commented Oct 10, 2018

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

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

No branches or pull requests

1 participant