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

Request for Official Support for Golang and Rust Interoperability in Dart #59610

Open
stephane-archer opened this issue Nov 26, 2024 · 5 comments · May be fixed by dart-lang/site-www#6237
Open
Labels
area-documentation Prefer using 'type-documentation' and a specific area label. area-native-interop Used for native interop related issues, including FFI. type-enhancement A request for a change that isn't a bug

Comments

@stephane-archer
Copy link

The Dart language currently supports interoperability with C, Swift, Kotlin, and JavaScript, as detailed in the official documentation. However, there is no mention of official support for two increasingly popular and performance-focused languages: Golang and Rust.

Given the widespread adoption of Golang and Rust in systems programming and server-side development, adding official support for these languages could greatly enhance Dart's ecosystem. Both languages are known for their efficiency and strong community backing, making them valuable complements to Dart's existing capabilities.

Official support for Golang and Rust interop would solidify Dart's position as a modern, versatile language capable of bridging the gap between high-level application development and low-level systems programming. Can we hope to see this added to the roadmap?

@dart-github-bot
Copy link
Collaborator

Summary: User requests official Dart support for interoperability with Go and Rust, citing their popularity and performance benefits for expanding Dart's capabilities.

@dart-github-bot dart-github-bot added area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-enhancement A request for a change that isn't a bug labels Nov 26, 2024
@lrhn lrhn added area-native-interop Used for native interop related issues, including FFI. and removed area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. labels Nov 26, 2024
@liamappelbe
Copy link
Contributor

Rust interop is already supported by a 3rd party package: https://pub.dev/packages/flutter_rust_bridge

I think @dcharkes investigated the possibility of Golang interop for a GSoC project. We don't really have the resources to put the same time and effort into Go interop that we do into C/ObjC/Java etc. But there's nothing stopping the community from building a Go version of flutter_rust_bridge.

@stephane-archer
Copy link
Author

Can we hope for a simple page like this one for Rust? https://dart.dev/interop/c-interop
I feel this can easily go under the radar because there is no mention of Rust in the official documentation (it did for me).
C++ is just mentioned here: https://docs.flutter.dev/platform-integration/platform-channels , no idea if it's just the c-interop or if it is a deeper interop
looking at that page:

Kotlin or Java on Android
Swift or Objective-C on iOS
C++ on Windows
Objective-C on macOS
C on Linux

This is not accurate, macOS supports Swift too. I can't imagine C be only available for Linux only...
I would love it if we can make the interop doc a bit more accurate and complete

I'm glad to hear @dcharkes is working on Golang interop, the easy parallelism of this language without the complexity of Rust would be great.

@dcharkes
Copy link
Contributor

+1 to what @liamappelbe said. Rust and Go are community efforts. 👍

For Go there's also a project started already: https://github.com/csnewman/flutter-go-bridge I'm @csnewman would be happy with contributions!

@dcharkes dcharkes closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
@dcharkes dcharkes reopened this Nov 26, 2024
@dcharkes dcharkes added the area-documentation Prefer using 'type-documentation' and a specific area label. label Nov 26, 2024
@dcharkes
Copy link
Contributor

Can we hope for a simple page like this one for Rust? https://dart.dev/interop/c-interop

@stephane-archer You can make a PR for the documentation page here: https://github.com/dart-lang/site-www/tree/main/src/content/interop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-documentation Prefer using 'type-documentation' and a specific area label. area-native-interop Used for native interop related issues, including FFI. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants