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

feat(tooling/api/dart): Add initial dart API implementation that mimicks the TS API. #6636

Closed
wants to merge 1 commit into from

Conversation

helpisdev
Copy link

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe: Introduces a new API module for the Dart language, mimicking the TS API as much as possible.

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

This PR will (hopefully) add support for the Dart programming language to use with Tauri. With the awesome Tauri v2 update, which supports mobile, using Dart and Flutter for the frontend can make development much faster, since they natively support mobile as well.

While I have ported the API to Dart, this PR is not yet ready for merging, because a few more things need to be added/reviewed. In the meantime time, this PR can serve as a discussion place for tauri_dart, gathering feedback from the maintainers and other Dart enthusiasts.

The following objectives should also be completed before merging:

  • Integration testing with the tauri backend
  • Unit tests and scenarios
  • Making sure that code examples in the docs are valid Dart
  • Use dartdoc annotations/features to improve the quality of the docs
  • Document undocumented API members
  • Decide which parts should be part of the public API
  • Author an example project
  • Get feedback and reviews from the official maintainers
  • Upload to pub.dev once the API is has matured to a beta release

@helpisdev helpisdev requested a review from a team as a code owner April 4, 2023 17:37
@helpisdev helpisdev marked this pull request as draft April 4, 2023 17:38
@helpisdev
Copy link
Author

helpisdev commented Apr 5, 2023

After the mention of @lucasfernog at this rfc discussion, I explored more thoroughly where tauri is heading at, with the guest APIs.

From the design changes being discussed/implemented (API refactor, tauri-bindgen, capability based structure), it seems like that this API should wait until tauri-v2 is ready for production use. That way we can decide how this API should be designed based on what changes (breaking or not) are introduced in the core.

In that note, @lucasfernog and others, in your opinion, what should I be looking at next? tauri-bindgen definitely looks very interesting and I think I could play around with it, trying to add support for generating Dart guest bindings. Another possibility is to transfer this PR to the plugins-workspace. In the latter case, I believe the API surface should be discussed first, since many components of the current API version might become separate plugins as well (it makes sense that the core components should be prioritized).

@JonasKruckenberg
Copy link
Contributor

Heya ✌️
As the core maintainer of tauri-bindgen and sorta IPC head around here I wanted to get in touch (now that I'm back from vacation 😁)

First off: Stunning work you've done with this PR so far, we all would be very happy to have you as a contributor around for Tauri!

As you mentioned though this change comes at a bit of a weird time for us with the changes to the API we want to make, however here's a plan that I think can work:

We will start sketching out the new APIs in the .wit schema language used by tauri-bindgen. This means that each plugin will have one or more associated .wit files that describe their functionality (even though initial implementations will most likely not yet use tauri-bindgens codegen as that's still WIP)

While we sketch out the APIs and define the schemas and finish tauri-bindgens code generation you could help bring Dart support to tauri-bindgen.
This way we can limit the amount of language-specific maintenance work and focus on the important features.

If you're interested, get in touch with me directly on discord or something and I can help you with adding dart support to tauri-bindgen 👍

@helpisdev
Copy link
Author

Heya v As the core maintainer of tauri-bindgen and sorta IPC head around here I wanted to get in touch (now that I'm back from vacation grin)

First off: Stunning work you've done with this PR so far, we all would be very happy to have you as a contributor around for Tauri!

As you mentioned though this change comes at a bit of a weird time for us with the changes to the API we want to make, however here's a plan that I think can work:

We will start sketching out the new APIs in the .wit schema language used by tauri-bindgen. This means that each plugin will have one or more associated .wit files that describe their functionality (even though initial implementations will most likely not yet use tauri-bindgens codegen as that's still WIP)

While we sketch out the APIs and define the schemas and finish tauri-bindgens code generation you could help bring Dart support to tauri-bindgen. This way we can limit the amount of language-specific maintenance work and focus on the important features.

If you're interested, get in touch with me directly on discord or something and I can help you with adding dart support to tauri-bindgen +1

Great! I had already started playing around with tauri-bindgen anyways to add a guest-dart, and so far most .wit files are working.

I have just joined the discord server btw and sent you a friend request to continue discussing there if you'd like.

@helpis-software helpis-software closed this by deleting the head repository May 18, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants