tree: 662345c2e3c98bae3e9cd61194a35719d4dda7fb [path history] [tgz]
  1. lib/
  2. rust/
  3. src/
  4. test/
  5. .gitignore
  6. build.dart
  7. ffigen.yaml
  8. manifest.yaml
  9. pubspec.yaml
  10. pubspec_overrides.yaml
  11. README.md
pkgs/native_assets_cli/example/use_rust/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.