-
Notifications
You must be signed in to change notification settings - Fork 754
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
[proposal] Flutter plugin using dart:ffi #799
Comments
Can you simply use quiche via the C FFI? For instance, this is the approach that some folks have taken with Java, integrating quiche via quiche's C FFI and the JNI. |
@LPardue thanks for the quic ;) ;) ;) answer the interaction between native code and flutter still happens through the platform import 'dart:ffi'; // For FFI
import 'dart:io'; // For Platform.isX
final DynamicLibrary nativeAddLib = Platform.isAndroid
? DynamicLibrary.open("libnative_add.so")
: DynamicLibrary.process();
/// [...]
final int Function(int x, int y) nativeAdd =
nativeAddLib
.lookup<NativeFunction<Int32 Function(Int32, Int32)>>("native_add")
.asFunction();
(source) as a matter of fact several db for flutter do exactly that side note, I almost forgot that dart:ffi works also on desktop (initial post updated) |
I'm not sure what the ask is. Plenty of folks are integrating quiche into different runtimes etc. That can be done independent of the quiche project needing to do anything. |
I just think that it would be great if there was a quiche plugin for flutter |
Glad this has been raised because we are also looking at this area. As far as i know, this would mean that they you are not dependent on the networking stack ? Also would this mean that you must run http/3 on your server ? quiche supports http/2, fallbacks ? Also would that get developers access to the new Web Transport P2P aspects via quiche ? |
This proposal seems like something better developed and maintained by folks closer to the Flutter community. |
Flutter is a popular framework for mobile (stable), web (beta) and desktop (dev) that ranks as 16th most starred repo on github
At the moment dart team seems to be too busy to implement http/3 in Dart
it would be great if
quiche
team, possibly with the help of the community could provide support forflutter
I see that quiche already provides support for android and ios but,
as dart:ffi allows interoperability with native code that seems to work well with rust [ references: 1, 2, 3]
an implementation through
dart:ffi
would be definitely offer better performances (in a nutshell allowing to do this instead of that)and dart:ffi works also on desktop
thank you for your time
The text was updated successfully, but these errors were encountered: