【文件属性】:
文件名称:go_dart_ffi_example
文件大小:47KB
文件格式:ZIP
更新时间:2021-05-22 08:24:01
C
从Go goroutine异步调用Dart的演示。
$ go build -o godart.so -buildmode=c-shared
$ dart godart.dart
Go: Starting some asynchronous work
Go: Returning to Dart
GO: 2 seconds passed
Received: 1 from Go
Dart: 2 seconds passed
GO: 2 seconds passed
Received: 2 from Go
Dart: 2 seconds passed
GO: 2 seconds passed
Received: 3 from Go
Dart: 2 seconds passed
GO: 2 seconds passed
Received: 4 from Go
Dart: 2 seconds pas
【文件预览】:
go_dart_ffi_example-master
----pubspec.yaml(284B)
----go.mod(207B)
----dart_api_dl()
--------go.mod(68B)
--------dart_api_dl.go(801B)
--------include()
----godart.go(565B)
----README.md(511B)
----godart.dart(891B)