Skip to content

Commit

Permalink
Expand readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes committed Dec 13, 2023
1 parent da17a60 commit 231a7d8
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions pkgs/native_assets_cli/example/use_dart_api/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
An example that uses `dart_api_dl.h`.
An example that uses the [C API of the Dart VM].

Open TODO is to pass the path to the include folder rather than copying it in.
https://github.com/dart-lang/native/issues/839
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.

* https://github.com/dart-lang/native/issues/839

[C API of the Dart VM]: https://github.com/dart-lang/sdk/tree/main/runtime/include

0 comments on commit 231a7d8

Please sign in to comment.