tree: d013a3b8fd48e332014af94f0e8f17032bdf29ec [path history] [tgz]
  1. hook/
  2. lib/
  3. src/
  4. test/
  5. ffigen.yaml
  6. manifest.yaml
  7. pubspec.yaml
  8. README.md
pkgs/native_assets_cli/example/use_dart_api/README.md

An example that uses the C API of the Dart VM.

The example shows how to pass an object from the Dart heap to native code and hold on to it via a PersistentHandle. For more documentation about handles, and the other C API features refer to the documentation in the header files.

Usage

Run tests with dart --enable-experiment=native-assets test.

Open TODOs

It would be better to receive a path the include folder containing the C API rather than having to copy it into the src/ directory.