gpt4 book ai didi

dart - Dart 是否支持与 native 库的接口(interface)?

转载 作者:行者123 更新时间:2023-12-04 18:44:50 24 4
gpt4 key购买 nike

随着服务器端部分变得更加复杂,开发人员将需要利用现有软件。那么,Dart 是否支持与 native 库(尤其是 C 库)的接口(interface)?

最佳答案

是的,很有可能,here is the official guide.

Dart programs running on the standalone Dart VM (command-line apps) can call C or C++ functions in a shared library, by means of native extensions. This article shows how to write and build such native extensions on Windows, Mac OS X, and Linux.

You can provide two types of native extensions: asynchronous or synchronous. An asynchronous extension runs a native function on a separate thread, scheduled by the Dart VM. A synchronous extension uses the Dart virtual machine library’s C API (the Dart Embedding API) directly and runs on the same thread as the Dart isolate. An asynchronous function is called by sending a message to a Dart port, receiving the response on a reply port.

关于dart - Dart 是否支持与 native 库的接口(interface)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16704835/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com