hhstore / blog

My Tech Blog: about Mojo / Rust / Golang / Python / Kotlin / Flutter / VueJS / Blockchain etc.
https://github.com/hhstore/blog/issues
296 stars 24 forks source link

Dart FFI: Binding C/C++/Go/Rust Libs For Dart #242

Open hhstore opened 3 years ago

hhstore commented 3 years ago

📖 Abstract:

💯 Related:

hhstore commented 3 years ago

Dart FFI : 绑定其他语言(c/c++/go/rust)库使用

需求场景:

使用 Zig + FFI 配合 Flutter 方案:

dart 调用其他语言方案:

原生插件:

FFI(Foreign function interface):

dart 官方:

官方文档:

官方工具:

with wasm:

with Java:

官方示例:

持续关注:

FFI 实践:

ref:

lib:

hhstore commented 3 years ago

C + FFI => dart

案例:

通用USB

扫描TWAIN

网络

hhstore commented 3 years ago

C++ + FFI => dart

问题:

待实践的项目:

image

项目使用列表:

https://developer.trustwallet.com/wallet-connect

hhstore commented 3 years ago

Go + FFI => dart

一些讨论:

方案:

mobile:

desktop:

项目实践:

go 的其他方案:

hhstore commented 3 years ago

Rust + FFI => dart

libs + tools:

实践案例:

ref:

Sunbreak commented 3 years ago

Dart Native 同步/异步交互示例:https://github.com/Sunbreak/native_interop.tour

Cronet的Flutter插件工程:https://github.com/Sunbreak/cronet_flutter

微信:wk2311007 我主要在做Flutter PC相关工作,有个FFI群可以多多交流~

hhstore commented 3 years ago

Dart Native 同步/异步交互示例:https://github.com/Sunbreak/native_interop.tour

Cronet的Flutter插件工程:https://github.com/Sunbreak/cronet_flutter

微信:wk2311007 我主要在做Flutter PC相关工作,有个FFI群可以多多交流~

rust + ffi + dart:

hhstore commented 3 years ago

flutter 调用原生的另一种方案: platform channel

laojianzi commented 2 years ago

一个非常好的实现 appflowy system design,目前看起来 rust 表现最好,但可惜我不会 rust,一直没发现 go 有很好的多平台方案,cgo 本身已经不简单了...

hhstore commented 2 years ago

一个非常好的实现 appflowy system design,目前看起来 rust 表现最好,但可惜我不会 rust,一直没发现 go 有很好的多平台方案,cgo 本身已经不简单了...